Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove byte order mark from source files. closes #6

  • Loading branch information...
commit fc04838c1c326a64a0409002c248c33c8e68fc88 1 parent 2d0305b
@andrewrk authored
View
3  src/jspackage.co
@@ -28,6 +28,9 @@ const parseFile = !(resolved_dep, cb) ->
if err
cb(err)
return
+ # remove byte order mark from source
+ if source.charCodeAt(0) is 65279
+ source = source.substring(1)
const parser = extensions[path.extname(resolved_dep.path)]
try
file.compiled_js = parser.compile(source, resolved_dep.options)
View
2  tests/bom/expected.txt
@@ -0,0 +1,2 @@
+hello
+main
View
1  tests/bom/hello.js
@@ -0,0 +1 @@
+console.log("hello");
View
2  tests/bom/test.js
@@ -0,0 +1,2 @@
+//depend "hello"
+console.log("main");
Please sign in to comment.
Something went wrong with that request. Please try again.