fix: prevent dx fmt from adding trailing whitespace to blank lines (#5224)
This fixes a conflict between dx fmt and cargo fmt (rustfmt). Previously, dx fmt would add indentation whitespace to blank lines inside RSX blocks, but cargo fmt removes trailing whitespace from all lines. This made it impossible for code to satisfy both formatters. The fix skips adding indentation to empty lines in two places: 1. When indenting formatted RSX blocks inside expressions 2. When reassembling the final formatted output Fixes #5223 Co-authored-by: Dmitry Minkovsky <dminkovsky@gmail.com>
This commit is contained in:
1 parent
8eb4322de2
commit
3a60140dff
4 files changed
+37
-3
No files matched your search
@@ -62,4 +62,6 @@ twoway![
|
||||
asset,
|
||||
collapse,
|
||||
expr_on_conditional,
|
||||
blank_lines,
|
||||
blank_lines_preserved,
|
||||
];
|
||||
Reference in new issue
Block a user