fix(lua): proper indent after multiline string arg

This commit is contained in:
Riley Bruins 2024-08-04 18:26:18 -07:00 committed by Christian Clason
parent d7353a6b72
commit 558c7ad7bf
3 changed files with 6 additions and 0 deletions

View file

@ -17,6 +17,7 @@
[
"end"
"}"
"]]"
] @indent.end
(")" @indent.end

View file

@ -3,3 +3,7 @@ a
multiline
string
]]
print [[
test
]]

View file

@ -28,6 +28,7 @@ describe("indent Lua:", function()
run:new_line("string.lua", { on_line = 2, text = "x", indent = 0 })
run:new_line("string.lua", { on_line = 3, text = "x", indent = 2 })
run:new_line("string.lua", { on_line = 4, text = "x", indent = 4 })
run:new_line("string.lua", { on_line = 9, text = "x", indent = 0 })
run:new_line("table.lua", { on_line = 1, text = "b = 0,", indent = 2 })
run:new_line("table.lua", { on_line = 5, text = "4,", indent = 4 })
run:new_line("table.lua", { on_line = 7, text = "4,", indent = 4 })