Skip to content

Commit

Permalink
feat: use "uu" for unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Oct 15, 2024
1 parent 7399000 commit 8ba9495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schema/jiandao.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ recognizer:
danzi_lookup: "[a-z`]*`+[a-z`]*"
punct: "^/([0-9]0?|[a-z]+)$"
calc: "^=[^;']+$"
unicode: "^u`[0-9a-f]*$"
unicode: "^uu[0-9a-f]*$"

topup:
__include: "layout/topup"
Expand Down
2 changes: 1 addition & 1 deletion schema/lua/jiandao/unicode_translator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
--]]

local function translator(input, seg)
local delimiter = string.find(input, "u`")
local delimiter = string.find(input, "uu")
if delimiter ~= nil then
local input_code = string.sub(input, delimiter + 2)
local codepoint = tonumber(input_code, 16)
Expand Down

0 comments on commit 8ba9495

Please sign in to comment.