This repository was archived by the owner on Oct 19, 2023. It is now read-only.
Repository navigation
Option to remove BOM from start of file - #46
Merged
Merged
Conversation
# Conflicts: # index.js
Contributor
Author
|
@kirbysayshi you seem to have write access now. Any chance of getting this pr merged? |
Collaborator
|
Is there ever a reason to include a BOM? I'm wondering if it's worthwhile to just always test for it and strip it if found, vs an explicit option. |
Contributor
Author
|
I added it as an explicit option as this is how it is done on the handlebars precompiler. However, I am with you on this one.. why would you ever want to keep it?! |
Collaborator
|
I'm going to merge this, and remove the optional part of it. I can't imagine ever wanting a BOM, might as well just strip it if found. |
kirbysayshi
added a commit
that referenced
this pull request
Oct 12, 2015
Option to remove BOM from start of file
kirbysayshi
added a commit
that referenced
this pull request
Oct 12, 2015
Collaborator
|
@danspam this is published as v2.4.1! I reworked your change to always strip and used a regex instead of the unprintable character. Thanks for the submission! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to the command line version of handlebarsjs, added the option to remove the BOM character from the template before it is compiled. This stops the
character appearing in the html causing unwanted spaces when your text editor saves the file as UTF8 with Signature or similar.Fixes #18 and includes test.