Permalink
Browse files

don't die on byte order mark at the beginning of files

  • Loading branch information...
1 parent 315230b commit aa0ba96c00c06b712ee26477739d0404f5fa0128 Thomas Mayfield committed Sep 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/parse-js.js
View
@@ -249,7 +249,7 @@ var EX_EOF = {};
function tokenizer($TEXT, skip_comments) {
var S = {
- text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n"),
+ text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, ''),
pos : 0,
tokpos : 0,
line : 0,

0 comments on commit aa0ba96

Please sign in to comment.