diff options
| author | Stuart Dootson <stuart.dootson@gmail.com> | 2016-08-24 21:32:04 +0100 |
|---|---|---|
| committer | Nick Cameron <nrc@ncameron.org> | 2016-08-25 08:32:04 +1200 |
| commit | 61042e6e4d6680bd7788c37086c56ef2cd764217 (patch) | |
| tree | 0183a61efd41d344bc9edc695d28d3bc80a69364 /src/rustfmt_diff.rs | |
| parent | d022f05f340b9aa4956ca315f5e424a6d3ab3248 (diff) | |
Fix issue 1124 - detect start of output rather than start of input file when writing output source file (#1133)
* 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
Diffstat (limited to 'src/rustfmt_diff.rs')
0 files changed, 0 insertions, 0 deletions
