diff --git a/lib/less/parser.js b/lib/less/parser.js index d0c552337..b984830eb 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -265,6 +265,9 @@ less.Parser = function Parser(env) { i = j = current = furthest = 0; input = str.replace(/\r\n/g, '\n'); + // Remove potential UTF Byte Order Mark + input = str.replace(/^\uFEFF/, ''); + // Split the input into chunks. chunks = (function (chunks) { var j = 0,