diff --git a/pret-pas.lua b/pret-pas.lua index 0439fea..736bb9d 100644 --- a/pret-pas.lua +++ b/pret-pas.lua @@ -96,6 +96,9 @@ local function written(state,c,i) end function visualizer.flush_line(str, nested) + local state, instr, inesc, word = 0, false, false, nil + buffers.currentcolors = colors + --[[ local identifier = nil for c in string.string.utfcharacters(str) do @@ -118,8 +121,7 @@ function visualizer.flush_line(str, nested) --flush_pas_word(identifier) identifier = nil ]] - local state, instr, inesc, word = 0, false, false, nil - buffers.currentcolors = colors + local code, comment = string.match(str,"^(.-)%-%-%[%[(.*)$") if comment then -- process the code and then flush the comment