Stuart Dootson 61042e6e4d 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
2016-08-25 08:32:04 +12:00
..
2016-03-14 18:55:55 +13:00
2016-04-07 20:29:05 +01:00
2016-04-07 20:29:05 +01:00
2016-04-07 20:29:05 +01:00
2016-07-26 17:34:11 +12:00
2016-08-01 10:10:04 +02:00
2016-03-09 02:44:01 -08:00
2016-06-12 20:37:15 +09:00
2016-04-27 21:08:44 +02:00
2016-05-12 21:50:43 +02:00
2016-03-15 14:08:12 -06:00
2016-04-15 17:56:43 +02:00
2016-03-14 20:05:20 -06:00