Compare commits

...

1 Commits

Author SHA1 Message Date
George Sokianos 0cb20ab7b2 a small fix in case the text is nil 2023-01-08 20:42:19 +00:00
1 changed files with 81 additions and 79 deletions

View File

@ -225,6 +225,7 @@ function tokenizer.tokenize(incoming_syntax, text, state)
end
local text_len = text:ulen()
if text_len ~= nil then
while i <= text_len do
-- continue trying to match the end pattern of a pair if we have a state set
if current_pattern_idx > 0 then
@ -315,6 +316,7 @@ function tokenizer.tokenize(incoming_syntax, text, state)
i = i + 1
end
end
end
return res, state
end