There seems to be two issues with newline handling.
The first, and more serious issue is that if a variable from <eval> contains a newline and the usage of it is preceeded by an empty line in the <content>, double newlines will be inserted for each newline in the variable.
The second issue is that leading and trailing newlines in the entire are stripped. Since I use snippets to generate C/C++ header file templates and I want the file to always end in a newline, this is annoying. There is however a workaround, add a non-existing variable at the very end or very start. For example:
There seems to be two issues with newline handling.
The first, and more serious issue is that if a variable from
<eval>
contains a newline and the usage of it is preceeded by an empty line in the<content>
, double newlines will be inserted for each newline in the variable.The second issue is that leading and trailing newlines in the entire are stripped. Since I use snippets to generate C/C++ header file templates and I want the file to always end in a newline, this is annoying. There is however a workaround, add a non-existing variable at the very end or very start. For example:
Here is an example snippet that demonstrates both issues: