Selaa lähdekoodia

fix: Disabling short-children inlining when inline attributes is disabled

marc2332 1 vuosi sitten
vanhempi
commit
c10cefffb6
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/autofmt/src/lib.rs

+ 1 - 1
packages/autofmt/src/lib.rs

@@ -140,7 +140,7 @@ pub fn write_block_out(body: CallBody) -> Option<String> {
 }
 
 fn write_body(buf: &mut Writer, body: &CallBody) {
-    if buf.is_short_children(&body.roots).is_some() {
+    if buf.is_short_children(&body.roots).is_some() && !buf.out.indent.inline_attributes() {
         // write all the indents with spaces and commas between
         for idx in 0..body.roots.len() - 1 {
             let ident = &body.roots[idx];