Skip to content

Commit 73cc1bc

Browse files
committed
fix bug
1 parent 424fcd5 commit 73cc1bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeFormatCore/src/Format/Analyzer/LineBreakAnalyzer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void LineBreakAnalyzer::ComplexAnalyze(FormatState &f, const LuaSyntaxTree &t) {
4242
switch (syntaxNode.GetSyntaxKind(t)) {
4343
case LuaSyntaxNodeKind::Block: {
4444
auto children = syntaxNode.GetChildren(t);
45-
if (syntaxNode.IsSingleLineNode(t)) {
45+
if (syntaxNode.GetParent(t).IsSingleLineNode(t)) {
4646
if (children.size() <= 1) {
4747
auto spaceAnalyzer = f.GetAnalyzer<SpaceAnalyzer>();
4848
spaceAnalyzer->SpaceAround(syntaxNode, t);

0 commit comments

Comments
 (0)