fix: only apply comments if relevant
This commit is contained in:
1 parent
fa9ebe17cc
commit
19e6e43358
6 files changed
+35
-1
No files matched your search
@@ -127,7 +127,9 @@ impl Buffer {
|
||||
for child in children {
|
||||
// Exprs handle their own indenting/line breaks
|
||||
if !matches!(child, BodyNode::RawExpr(_)) {
|
||||
self.write_comments(child.span())?;
|
||||
if self.current_span_is_primary(child.span()) {
|
||||
self.write_comments(child.span())?;
|
||||
}
|
||||
self.tabbed_line()?;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user