As explained in #92, when generating markdown from JS files with CRLF
line endings the output is produced with mixed line endings.
As is the recommended fix for that issue I tried using the new --EOL
option to force the output to use consistent line endings. However this option does not seem to be fully working as expected.
When I run jsdoc2md test.js --EOL win32 > README.md
over the following code saved with CRLF
line endings:
/** * Adds two numbers. * @param {number} a The first number to be added. * @param {number} b The second number to be added. * @returns {number} The sum of a and b. * @example * let a = 1; * let b = 2; * // returns 3 * add(a, b); */ function add(a, b) { return a + b; }
it correctly outputs the line endings for everything except multiline @example
tags where it instead outputs just carriage returns.
The same thing happens when running with option --EOL posix
.
jsdoc2md test.js --EOL posix > README.md
:
These same commands generate the expected output (completely consistent line encodings) when the input file is saved using LF
line encodings.
This causes problems as not all markdown renderers render a carriage return on its own as a new line which means the examples get squashed onto one line.
I am using jsdoc-to-markdown
version 9.0.1
and dmd
version 7.0.6
on Windows 11.
Let me know if you are unable to reproduce this or if there is any more information I can provide.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4