gulp-posthtml runs with no errors but generates malformed HTML only in Ubuntu
Details
I use gulp-posthtml in my Polymer project to strip the CSS from a component and apply autoprefixer, like this
...
.pipe(gulpif(/\.html$/, postHtml([postHtmlPostCss([autoprefixer('last 2 versions')])])))
...
On MacOS 10.13.2 everything works perfectly. But if I run exactly the same on a Jenkins setup I have detected that gulp-posthtml generates some malformed HTML:
The original part of the code (part of an iron-ajax call)
body='{"start":[[startingItem]], "count":[[itemsPerPage]], "query": "[[query]]"}'
The part of the code generated on MacOS (html works)
body="{"start":[[startingItem]], "count":[[itemsPerPage]], "query": "[[query]]"}"
The code generated by Jenkins (on an Ubuntu 16)
body="{" start":[[startingitem]],="" "count":[[itemsperpage]],="" "query":="" "[[query]]"}"=""
Notice the space added before start and the ="" in several positions
Environment
MacOS environment
| OS |
node |
npm/yarn |
package |
| MacOS 10.13.2 |
8.10.0 |
5.6.0 |
3.0.0 |
Jenkins environment
| OS |
node |
npm/yarn |
package |
| Ubuntu 16 |
8.10.0 |
5.6.0 |
3.0.0 |
gulp-posthtmlruns with no errors but generates malformed HTML only in UbuntuDetailsI use
gulp-posthtmlin my Polymer project to strip the CSS from a component and apply autoprefixer, like thisOn MacOS 10.13.2 everything works perfectly. But if I run exactly the same on a Jenkins setup I have detected that
gulp-posthtmlgenerates some malformed HTML:The original part of the code (part of an
iron-ajaxcall)body='{"start":[[startingItem]], "count":[[itemsPerPage]], "query": "[[query]]"}'The part of the code generated on MacOS (html works)
body="{"start":[[startingItem]], "count":[[itemsPerPage]], "query": "[[query]]"}"The code generated by Jenkins (on an Ubuntu 16)
body="{" start":[[startingitem]],="" "count":[[itemsperpage]],="" "query":="" "[[query]]"}"=""Notice the space added before
startand the=""in several positionsEnvironmentMacOS environment
Jenkins environment