diff --git a/lib/6to5/helpers/code-frame.js b/lib/6to5/helpers/code-frame.js index 719a26773a..4aaa8b6c46 100644 --- a/lib/6to5/helpers/code-frame.js +++ b/lib/6to5/helpers/code-frame.js @@ -47,7 +47,7 @@ module.exports = function (lines, lineNumber, colNumber) { lines = highlight(lines); } - lines = lines.split("\n"); + lines = lines.split(/\r\n|[\n\r\u2028\u2029]/); var start = Math.max(lineNumber - 3, 0); var end = Math.min(lines.length, lineNumber + 3);