Commit a1fd498
committed
Only disable wrapping in import decls when it is safe to do so.
The ImportDeclSyntax attributes might include IfConfigDecls, which
absolutely require line breaks in certain positions. The disable
breaking logic of ImportDecl was preventing these from being emitted.1 parent d7976ce commit a1fd498
File tree
2 files changed
+23
-10
lines changed- Sources/SwiftFormat/PrettyPrint
- Tests/SwiftFormatTests/PrettyPrint
2 files changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1458 | 1458 | | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | | - | |
| 1461 | + | |
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
1896 | | - | |
1897 | | - | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1898 | 1904 | | |
1899 | 1905 | | |
1900 | 1906 | | |
1901 | 1907 | | |
1902 | 1908 | | |
1903 | | - | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
1904 | 1912 | | |
1905 | 1913 | | |
1906 | 1914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
566 | 570 | | |
567 | 571 | | |
568 | 572 | | |
569 | 573 | | |
570 | 574 | | |
| 575 | + | |
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
| |||
0 commit comments