diff --git a/lib/less/parser/parser.js b/lib/less/parser/parser.js index 46174120..608dd49b 100644 --- a/lib/less/parser/parser.js +++ b/lib/less/parser/parser.js @@ -102,7 +102,7 @@ var Parser = function Parser(context, imports, fileInfo) { imports.contentsIgnoredChars[fileInfo.filename] = preText.length; } - str = str.replace(/\r\n/g, '\n'); + str = str.replace(/\r\n?/g, '\n'); // Remove potential UTF Byte Order Mark str = preText + str.replace(/^\uFEFF/, '') + modifyVars; imports.contents[fileInfo.filename] = str;