senchalabs / jsduck

Simple JavaScript Duckumentation generator.
http://docs.sencha.com/
GNU General Public License v3.0
1.5k stars 239 forks source link

Carriage returns are not treated as newlines #626

Open garie opened 9 years ago

garie commented 9 years ago

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 }