Closed LawnGnome closed 3 years ago
Excellent :) Thanks a lot
Also, I should say It's pretty nice to see my little pet project featured in sourcegraph's documentation :)
Also, I should say It's pretty nice to see my little pet project featured in sourcegraph's documentation :)
We're really grateful to you for writing it! Thanks; we like it a lot. :smiley:
Previously, FilePatcher could not differentiate between files with and without trailing newlines, and always wrote files with trailing newlines. As a result, files without trailing newlines that were otherwise unchanged would be modified.
This commit introduces a new LineIterator that preserves the trailing delimiter, if present, and ensures that files are written with the same newline structure they had when read.