Return state when tokenizing plaintext syntaxes
This commit is contained in:
parent
fa694ae6f8
commit
523e62bdce
|
@ -133,12 +133,12 @@ function tokenizer.tokenize(incoming_syntax, text, state, resume)
|
||||||
local res
|
local res
|
||||||
local i = 1
|
local i = 1
|
||||||
|
|
||||||
if #incoming_syntax.patterns == 0 then
|
|
||||||
return { "normal", text }
|
|
||||||
end
|
|
||||||
|
|
||||||
state = state or string.char(0)
|
state = state or string.char(0)
|
||||||
|
|
||||||
|
if #incoming_syntax.patterns == 0 then
|
||||||
|
return { "normal", text }, state
|
||||||
|
end
|
||||||
|
|
||||||
if resume then
|
if resume then
|
||||||
res = resume.res
|
res = resume.res
|
||||||
-- Remove "incomplete" tokens
|
-- Remove "incomplete" tokens
|
||||||
|
|
Loading…
Reference in New Issue