Changed DocView not to strip trailing `\n` character on line's final token
This commit is contained in:
parent
36b77171c4
commit
33ad329f24
|
@ -136,8 +136,6 @@ function DocView:tokenize_line(idx, state)
|
||||||
cl.init_state = state
|
cl.init_state = state
|
||||||
cl.text = self.doc.lines[idx]
|
cl.text = self.doc.lines[idx]
|
||||||
cl.tokens, cl.state = highlighter.tokenize(self.syntax, cl.text, state)
|
cl.tokens, cl.state = highlighter.tokenize(self.syntax, cl.text, state)
|
||||||
local t = cl.tokens
|
|
||||||
t[#t] = t[#t]:sub(1, -2) -- strip '\n'
|
|
||||||
return cl
|
return cl
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue