diff --git a/spec/ucdn_spec.lua b/spec/ucdn_spec.lua index 757eef1..8475b43 100644 --- a/spec/ucdn_spec.lua +++ b/spec/ucdn_spec.lua @@ -6,7 +6,7 @@ describe("ucdn module", function() assert.are_equal("8.0.0", ucdn.get_unicode_version()) end) - it("returns the bidi class for a given codepoint", function() + it("returns the Bidi_Class propety value for a given codepoint", function() assert.are_equal(ucdn.UCDN_BIDI_CLASS_AL, ucdn.get_bidi_class(0x0627)) -- U+0627 ARABIC LETTER ALEF assert.are_equal(ucdn.UCDN_BIDI_CLASS_L, ucdn.get_bidi_class(0x0907)) -- U+0907 DEVANAGARI LETTER I assert.are_equal(ucdn.UCDN_BIDI_CLASS_WS, ucdn.get_bidi_class(0x0020)) -- U+0020 SPACE diff --git a/src/ucdn.luadoc b/src/ucdn.luadoc index 8e44e31..a9c5827 100644 --- a/src/ucdn.luadoc +++ b/src/ucdn.luadoc @@ -8,8 +8,14 @@ -- @module ucdn --- Return version of the Unicode database. +-- @return version string, e.g. `8.0.0` -- @function get_unicode_version +--- Get bidirectional class of a codepoint. +-- @param code Unicode codepoint +-- @return value according to ucdn.UCDN_BIDI_CLASS_* and as defined in UAX#44. +-- @function get_bidi_class + --- Bidi_Class property. -- Enumerated constants representing [Bidi_Class values](http://www.unicode.org/reports/tr44/#Bidi_Class_Values). -- @section