You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a function doc comment JSDoc alters the line breaks in the "description" section on Windows 10 (likely on other Windows versions too)
Input code
/**
* ---
* category: utilities
* ---
* Creates a debounced function that delays invoking func until after wait milliseconds have elapsed
* since the last tim
*/
function debounce()
The "comment" and "description" fields have the same line breaks. It works OK on OSX, buggy on Windows10.
Current behavior
The code above results in the following output in Windows (irrelevant parts removed):
"comment": "/**\r\n * ---\r\n * category: utilities\r\n * ---\r\n * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed\r\n * since the last tim",
"description": "---\rcategory: utilities\r---\rCreates a debounced function that delays invoking func until after wait milliseconds have elapsed\rsince the last tim",
"kind": "module",
Note that the line breaks were altered to \r in the "description" section from \r\n. On OSX the same part looks like this:
"comment": "/**\n * ---\n * category: utilities\n * ---\n * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed\r\n * since the last tim",
"description": "---\ncategory: utilities\n---\nCreates a debounced function that delays invoking func until after wait milliseconds have elapsed\nsince the last tim",
"kind": "module",
\r in the Windows "description" part is not a valid line break in most systems and will cause most parsers to fail. Please alter it to \r\n.
Your environment
Software
Version
JSDoc
4.0.0
Node.js
18.17.0
npm
9.6.7
Operating system
Windows 10
The text was updated successfully, but these errors were encountered:
When parsing a function doc comment JSDoc alters the line breaks in the "description" section on Windows 10 (likely on other Windows versions too)
Input code
JSDoc configuration
Expected behavior
The "comment" and "description" fields have the same line breaks. It works OK on OSX, buggy on Windows10.
Current behavior
The code above results in the following output in Windows (irrelevant parts removed):
Note that the line breaks were altered to
\r
in the "description" section from\r\n
. On OSX the same part looks like this:\r
in the Windows "description" part is not a valid line break in most systems and will cause most parsers to fail. Please alter it to\r\n
.Your environment
The text was updated successfully, but these errors were encountered: