ejs
ejs copied to clipboard
Strange behavior with rmWhiteSpace
If I enable rmWhiteSpace
, then for some of my .ejs files, it concatenates 2 consecutive lines into one. So far I only noticed this with .ejs files containing javascript code such as the following:
$form.find('.submit').prop('disabled', false); // Re-enable submission
} else {
it would generate
$form.find('.submit').prop('disabled', false); // Re-enable submission} else {
which of course doesn't mean the same thing.
Is this expected and this is a misunderstanding of what rmWhiteSpace
is supposed to do, or is it a bug?
Thanks!
I'd call that a bug. Are you using CRLF line endings?
I'm definitely using CRLF on my test machine, but the server is running Linux and files only contain LF and I have the same behavior. The file where I have the problem is used via an EJS include in case it matters (the old way <% include ../../file.ejs %>
).