Bugfix
This commit is contained in:
parent
36143d935d
commit
6745d01e32
|
@ -8,7 +8,7 @@ return function(code)
|
|||
assert(type(code) == 'string')
|
||||
|
||||
local res, last, ws1, ws2, escape = '', false, '\n', '\n', false
|
||||
local sp = {['"'] = true, ["'"] = true}
|
||||
local sp = {['"'] = true, ["'"] = true, ['['] = true}
|
||||
|
||||
for i = 1, #code do
|
||||
local char = code:sub(i, i)
|
||||
|
@ -54,6 +54,13 @@ return function(code)
|
|||
elseif last == '"' or last == "'" then
|
||||
if char == last then last = false end
|
||||
res = res .. char
|
||||
elseif last == '[' then
|
||||
if char == last then
|
||||
last = last .. char
|
||||
else
|
||||
last = false
|
||||
end
|
||||
res = res .. char
|
||||
elseif last == '-' then
|
||||
if char == '-' then
|
||||
last, ws1 = '--', ws2
|
||||
|
|
Loading…
Reference in New Issue