Only drop the BOM when it's the first character.

Close #704
This commit is contained in:
Mihai Bazon
2015-05-05 10:11:38 +03:00
parent d558abbdb7
commit e637bdaf4e

View File

@@ -213,7 +213,7 @@ var EX_EOF = {};
function tokenizer($TEXT, filename, html5_comments) {
var S = {
text : $TEXT.replace(/\uFEFF/g, ''),
text : $TEXT.replace(/^\uFEFF/g, ''),
filename : filename,
pos : 0,
tokpos : 0,