Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]: <style> contents are split with "<" in comment #18

Closed
matthew-dean opened this issue Dec 13, 2017 · 2 comments
Closed

[fix]: <style> contents are split with "<" in comment #18

matthew-dean opened this issue Dec 13, 2017 · 2 comments

Comments

@matthew-dean
Copy link

I have markup like

<style>
/* width < 800px */
@media (max-width: 800px) {
  /* selectors */
}
</style>

The JS object for the style tag is:

{ tag: 'style',
  content:
   [ '\n/* width ',
     '< 800px */\n@media (max-width: 800px) {\n    /* selectors */\n  }\n' ] }

In other words, the parser incorrectly splits text content according to the < character.

@Scrum Scrum self-assigned this Dec 14, 2017
@Scrum Scrum added this to the 0.3.1 milestone Dec 14, 2017
@Scrum
Copy link
Member

Scrum commented Dec 14, 2017

@matthew-dean thanks, i will solve it

@Scrum Scrum changed the title <style> contents are split with "<" in comment [bug]: <style> contents are split with "<" in comment Dec 14, 2017
@Scrum Scrum changed the title [bug]: <style> contents are split with "<" in comment [fix]: <style> contents are split with "<" in comment Dec 14, 2017
@Scrum Scrum removed this from the 0.3.1 milestone Dec 15, 2017
@Scrum
Copy link
Member

Scrum commented Dec 15, 2017

Hi @matthew-dean
this bug related to htmlparse2:

I can recommend changing from /* width < 800px */ to /* width less 800px */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants