aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2015-05-05 10:11:38 +0300
committerMihai Bazon <mihai.bazon@gmail.com>2015-05-05 10:11:38 +0300
commite637bdaf4e95ce65c1021f7dda7d198054e99e83 (patch)
treef121afbb8054f320c976a0b4e192819275f467b9
parentd558abbdb76a69d99d3ebde6c8903e47639b3f68 (diff)
downloadtracifyjs-e637bdaf4e95ce65c1021f7dda7d198054e99e83.tar.gz
tracifyjs-e637bdaf4e95ce65c1021f7dda7d198054e99e83.zip
Only drop the BOM when it's the first character.
Close #704
-rw-r--r--lib/parse.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse.js b/lib/parse.js
index 53aaabd6..3cc2da51 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -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,