Permalink
Browse files

Remove UTF8 BOM - fixes #650

  • Loading branch information...
1 parent e94b5b6 commit 6696368eb351824f33dc0aac67143d8ea80a085a @lukeapage lukeapage committed Aug 19, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/less/parser.js
View
@@ -269,6 +269,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 = input.replace(/^\uFEFF/, '');
+
// Split the input into chunks.
chunks = (function (chunks) {
var j = 0,

0 comments on commit 6696368

Please sign in to comment.