Skip to content

Commit

Permalink
fix(lua): number_translator 不再捕获大写单词
Browse files Browse the repository at this point in the history
  • Loading branch information
mirtlecn authored and Mintimate committed May 13, 2024
1 parent fff4a36 commit 552f03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/number_translator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ local function number_translator(input, seg, env)
if env.number_keyword ~= '' and input:sub(1, 1) == env.number_keyword then
str = string.gsub(input, "^(%a+)", "")
numberPart = number_translatorFunc(str)
if #numberPart > 0 then
if str and #str > 0 and #numberPart > 0 then
for i = 1, #numberPart do
yield(Candidate(input, seg.start, seg._end, numberPart[i][1], numberPart[i][2]))
end
Expand Down

0 comments on commit 552f03e

Please sign in to comment.