Open charlierudolph opened 7 years ago
Have you tried
&:nth-of-type(2n+1) /* matches 1,3,5,7 etc */
ping @charlierudolph
Both should work, help appreciated!
I can see that we already strip out strings so we don't get false positives with commas in strings. Should be possible to use the same approach with line comments.
Example:
[...]
var removeQuotesRe = /(["'])(?:(?=(\\?))\2.)*?\1/g
var removeCommentRe = /\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm
[...]
// just strip content between quotes and inline comments, leave rest of syntax intact
// this is so we don't get false positives with , in strings and inline comments
var trimmedLine = origLine.replace( removeQuotesRe, '""' ).trim()
if ( this.state.hasComment ) {
trimmedLine = trimmedLine.replace( removeCommentRe, '$1' ).trim()
}
[...]
Currently the commaSpace rule is being applied to comments