--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/for/continue-and-break-comment-1.js --- # Input ```js for(;;) { continue // comment ; } for (;;) { break // comment ; } for (const f of []) { continue // comment ; } for (const f of []) { break // comment ; } for (const f in {}) { continue // comment ; } for (const f in {}) { break // comment ; } while(true) { continue // comment ; } while (true) { break // comment ; } do { continue // comment ; } while(true); do { break // comment ; } while(true); label1: for (;;) { continue label1 // comment ; } label2: { break label2 // comment ; }; for(;;) { continue /* comment */ ; } for (;;) { break /* comment */ ; } for (const f of []) { continue /* comment */ ; } for (const f of []) { break /* comment */ ; } for (const f in {}) { continue /* comment */ ; } for (const f in {}) { break /* comment */ ; } while(true) { continue /* comment */ ; } while (true) { break /* comment */ ; } do { continue /* comment */ ; } while(true); do { break /* comment */ ; } while(true); label1: for (;;) { continue label1 /* comment */ ; } label2: { break label2 /* comment */ ; }; ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -87,9 +87,9 @@ } while (true); label1: for (;;) { - continue label1 /* comment */; + continue label1; /* comment */ } label2: { - break label2 /* comment */; + break label2; /* comment */ } ``` # Output ```js for (;;) { continue; // comment } for (;;) { break; // comment } for (const f of []) { continue; // comment } for (const f of []) { break; // comment } for (const f in {}) { continue; // comment } for (const f in {}) { break; // comment } while (true) { continue; // comment } while (true) { break; // comment } do { continue; // comment } while (true); do { break; // comment } while (true); label1: for (;;) { continue label1; // comment } label2: { break label2; // comment } for (;;) { continue; /* comment */ } for (;;) { break; /* comment */ } for (const f of []) { continue; /* comment */ } for (const f of []) { break; /* comment */ } for (const f in {}) { continue; /* comment */ } for (const f in {}) { break; /* comment */ } while (true) { continue; /* comment */ } while (true) { break; /* comment */ } do { continue; /* comment */ } while (true); do { break; /* comment */ } while (true); label1: for (;;) { continue label1; /* comment */ } label2: { break label2; /* comment */ } ```