a small fix in case the text is nil
This commit is contained in:
parent
789004ea2c
commit
0cb20ab7b2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue