carlitoplatanito / gulp-nunjucks-render

[Gulp](https://github.com/wearefractal/gulp) plugin to render [Nunjucks](http://mozilla.github.io/nunjucks/) templates
149 stars 33 forks source link

Strange problem when using with gulp-useref #65

Open armpogart opened 7 years ago

armpogart commented 7 years ago

I have a workflow where one gulp task compiles nunjucks templates (with the help of this plugin) and outputs them to temporary folder and then other task uses gulp-useref to replace build blocks (for example I have css build block that must be replaced with combined and minified css file).

The problem is useref doesn't do it's job, but it's not useref problem. Everything is working fine with plain html files, but after this plugin renders html, useref is not doing its' job. The most strange thing is that when I manually open .html file in temporary folder, delete newline before build block (there's a newline there) and add it again (simply pressing enter) and run the useref task again, it does it's job. There is a feeling that there's some problem with newline, or there's a hidden character there....

armpogart commented 7 years ago

I guess it's something related to newline character (unix style vs CRLF), what newline ending does this plugin use on Windows and how can we change it?

TheDancingCode commented 6 years ago

Would you mind setting up a sample repository to illustrate your issue? That will make it easier to debug and help.