jsduck icon indicating copy to clipboard operation
jsduck copied to clipboard

Carriage returns are not treated as newlines

Open garie opened this issue 9 years ago • 0 comments

See Issue 606.

Carriage returns (\r chars) are not treated as newlines by JSDuck. This will result in a file with carriage returns on the same line as a line comment (//) causing JSDuck error Invalid JavaScript syntax: Unexpected end of file.

Example:

function asdf() {\n
    // some comment\r
}\n

which JSDuck is translating to:

function asdf() {
    // some comment }

garie avatar Oct 21 '15 17:10 garie