maxpoletaev / node-beml

HTML preprocessor for BEM
64 stars 4 forks source link

Failing on inverted quotes #11

Open pepelsbey opened 8 years ago

pepelsbey commented 8 years ago

Unfortunately it’s quite common pattern people copy from the spec:

<source src="video/windowsill.ogv" type='video/ogg; codecs="theora, vorbis"'>

And I see the following error:

/Users/pepelsbey/Projects/Opera/Dev.Opera/Site/node_modules/gulp-beml/node_modules/map-stream/index.js:103
        throw err
        ^
Error: Parse Error: <source src="video/windowsill.webm" type="video/webm; codecs="vp8, vorbis"">
        <source src="video/windowsill.ogv" type="video/ogg; codecs='theora, vorbis'">
      </video>
      </div>
    </div>
maxpoletaev commented 8 years ago

In my case single quotes are replaced by double quotes. But without crashing. I know this bug as https://github.com/cheeriojs/cheerio/issues/720. I can't fix it.

voischev commented 8 years ago

:(

pepelsbey commented 8 years ago

Sorry for calling it a crash, this is just my build failing. The rest is the same as in your case. Is there any other good alternative to cheerio? This is a serious ussue, since I should maintain a certain code quality to be able to use BEML :\