vscode-gitignore
vscode-gitignore copied to clipboard
fix: dont add new line if empty
If a .gitignore
file does exist, it adds a new line to the file even if the file is empty.
This checks the length of the file first, and will only append the initial new line if there was actually any content in the .gitignore
file in the first place.
This way, if the extension is used to append content to an empty file, it won't leave a blank line on line 1.
Resolved merge conflicts and updated to suit the new structure. Have all tests passing and this works is working for me in my local build.
Rebased with master
and fixed merge conflicts.