-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow choosing EOL and appending final newline #1546
Allow choosing EOL and appending final newline #1546
Conversation
Addresses #951 Adds the following options to js2svg and CLI: - eol — can be set to `lf` or `crlf`. If unspecified, js2svg uses the platform EOL. - finalNewline — defaults to false. If true, js2svg ensures any SVG output has a final newline. Tests added to cover both options.
Hi, could you clarify what's the point of finalNewline option? |
In a number of workspaces, files are required to have a final newline. For example, |
Aligns test format with refactor made in main branch
EOL is no longer converted to lower case, so only `crlf` and `lf` are now supported as options, not `CRLF` or `LF` or any other case.
Achieves parity with non-CLI behaviour of not allowing different cases
Thank you for working on this @adalinesimonian! |
Наконец-то! It's been a pleasure. 🎉 |
`os` package in js2svg module bothered me for a long time. We had to hack rollup to mock it for browser. Thanks to #1546 we now can pass eol from svgo-node entry point and simplify build.
`os` package in js2svg module bothered me for a long time. We had to hack rollup to mock it for browser. Thanks to #1546 we now can pass eol from svgo-node entry point and simplify build.
`os` package in js2svg module bothered me for a long time. We had to hack rollup to mock it for browser. Thanks to #1546 we now can pass eol from svgo-node entry point and simplify build.
Addresses #951
Adds the following options to js2svg and CLI:
lf
orcrlf
. If unspecified, js2svg uses the platform EOL.Tests added to cover both options.