8lueberry / express-dot-engine

Node.js engine using the ultra fast doT templating with support for layouts, partials and friendly for front-end web libraries (Angular, Ember, Backbone...)
MIT License
43 stars 10 forks source link

Multiple section support with UTF-8 BOM #17

Open emanuelhp opened 9 years ago

emanuelhp commented 9 years ago

Hi,

Multiple section support with a file encoded in UTF-8 only works without BOM, with BOM the mark "---" isn't recognized.

Solved using

engine.settings.config = /^\uFEFF?---([\s\S]+?)---/g;

Thanks, Emanuel

cjsturgess commented 5 years ago

Created a PR (#32) for this. Testing to make sure there's no impact to other features.