mirror of
https://github.com/less/less.js.git
synced 2026-01-22 13:48:03 -05:00
endlines and comments
possible fix for https://github.com/less/less.js/issues/2370 I have used the following command to test this issue: `printf "p {\r//less\rc:1;\r}\r" | lessc -` I'm not sure if this the most efficient fix. I also tried `var nextNewLine = inp.substr(parserInput.i + 1).search(/\n|\r/);` to replace the `indexOf` but then i expect possible mismatches for `\r\n` which match on the first `\r`.
This commit is contained in:
@@ -126,7 +126,7 @@ module.exports = function() {
|
||||
curr = parserInput.i - currentPos,
|
||||
endIndex = parserInput.i + current.length - curr,
|
||||
mem = (parserInput.i += length),
|
||||
inp = input,
|
||||
inp = input.replace(/\r\n|\r/gm, "\n"),
|
||||
c, nextChar, comment;
|
||||
|
||||
for (; parserInput.i < endIndex; parserInput.i++) {
|
||||
|
||||
Reference in New Issue
Block a user