thephilgray / gulp-epub-starter

An opinionated static EPUB generator with Less and BrowserSync + Readium Cloud Reader for live reload development.
2 stars 0 forks source link

replace gulp-htmltidy with gulp-prettier #71

Open thephilgray opened 5 years ago

thephilgray commented 5 years ago

still needs to encode certain entities, which get decoded by pug compile.

in my latest project, I was able to replace htmltidy with prettier and ensure that the ampersand is always encoding using gulp-converter-character-entities like this:

          // .pipe(
          //   htmltidy({
          //     literalAttributes: true,
          //     "drop-empty-elements": "no",
          //     "wrap-attributes": false
          //   })
          // )
          .pipe(
            convert({
              entity: {
                "&": "&"
              }
            })
          )
          .pipe(prettier({ parser: "html" }))