BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link

Weird double lines when using CRLF line endings #46

Open sewbacca opened 2 years ago

sewbacca commented 2 years ago

When using \r\n line endings, a lot of excess lines appear. It turns out, that there is a bug in the formatting function, adding \t in between and after \r\n line endings. This results in vscode replacing \r and \n into \r\n respectivly, so the total replacement will be \r\n\t\r\n\t instead of \r\n\t I have created a pull-request, as a proposal to fix this issue.