Skip to content

Commit 5339860

Browse files
committed
修复标签导致的算法不稳定的问题
1 parent 3bbf955 commit 5339860

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

CodeService/src/LuaFormatter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,6 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatBlock(std::shared_ptr<LuaAstN
345345
indentEnv->AddChild(childEnv);
346346
}
347347

348-
indentEnv->Add<KeepElement>(1);
349-
350348
break;
351349
}
352350
default:

Test/test_script/format_text/goto.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ while true do
1919
end
2020
end
2121
::endloop::
22+
fwfwfw = 123
2223
end
2324

Test/test_script/format_text_shouldbe/goto.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ function f2()
2020
end
2121

2222
::endloop::
23+
fwfwfw = 123
2324
end

0 commit comments

Comments
 (0)