61042e6e4d
* Change required to prevent a trailing space at the end of a separate module being propagated * Detect the start of the output file rather than the start of the input file when deciding whether to output preceding snippets - this stops unnecessary whitespace and blank lines from being inserted when spans and statements are output in an order other than that from the input file. * Add code to prevent space from being added with the prefix snippet if a) the snippet is entirely horizontal whitespace, or b) the snippet contains whitespace followed by a newline. This prevents trailing spaces at the end of a line from being added. * Tests for this issue * Tidy up `match` statements * Add test with blank lines between `use` statements
13 lines
153 B
Rust
13 lines
153 B
Rust
use d; use c; use b; use a;
|
|
// The previous line has a space after the `use a;`
|
|
|
|
mod a { use d; use c; use b; use a; }
|
|
|
|
use z;
|
|
|
|
use y;
|
|
|
|
|
|
|
|
use x;
|
|
use a; |