Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add in comment ignoring for CSS #12

Closed
Pomax opened this Issue · 4 comments

2 participants

@Pomax
Owner

block comments are not ignored at the moment, and they should very much be.

@toolness
Owner

If you could also add the comment's text extents to the parseInfo blob, that would be swell. In the future, this would allow us to easily e.g. point out a comment in a tutorial.

@Pomax
Owner

hmm, I'm making the CSS parser return a single object for the parserInfo of the element, since nothing inside of it counts as more than plain text content as far as the DOM is concerned. Would we rewrite the comments as dom comment nodes?</p>

@toolness
Owner

Well, in 81684b7 I extended the parseInfo blob it returns to actually include a bunch of information about the CSS contained within... I was originally thinking of actually putting this on top of the CSSStyleSheet DOM in the sheet property of the <style> node but decided against it, partly because that sheet property is only non-null when the <style> element is added to a real document.

Anyways, since parseInfo.rules is an array of rules in the sheet, maybe parseInfo.comments can be an array of comments in it?

@Pomax
Owner

done and done, pull request #17 pending.

@Pomax Pomax closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.