diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index 620dda1..62a5eca 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -1001,7 +1001,7 @@ function generateJS(ast, options) { ' };', '', ' while (p < pos) {', - ' if (input.charAt(p) === "\\n") {', + ' if (input.charCodeAt(p) === 10) {', ' details.line++;', ' details.column = 1;', ' } else {', diff --git a/lib/parser.js b/lib/parser.js index eb0c8e1..8ca58c4 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -439,7 +439,7 @@ module.exports = (function() { }; while (p < pos) { - if (input.charAt(p) === "\n") { + if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; } else {