chore: slice replace loop (#3410)

This commit is contained in:
guangwu
2023-07-11 13:27:46 +08:00
committed by GitHub
parent 61e562d0c7
commit f1171e01f2

View File

@@ -219,9 +219,7 @@ func transferTokenNode(node *TokenNode, opt ...tokenNodeOption) *TokenNode {
} }
} }
if !option.ignoreLeadingComment { if !option.ignoreLeadingComment {
for _, v := range node.LeadingCommentGroup { result.LeadingCommentGroup = append(result.LeadingCommentGroup, node.LeadingCommentGroup...)
result.LeadingCommentGroup = append(result.LeadingCommentGroup, v)
}
} }
return result return result
} }