Open achintverma opened 6 years ago
When I tried with --ignore-tags 'script' option then it shows weird output
Hi @achintverma, script
tags are ignored anyway by default, but in your case you actually want it to process script tags. However, the output will not be correct because the HTML parser will treat the script's content as text, not HTML. This is the output I get if I run without ignoring any tags (--ignore-tags ""
) on your provided sample:
/tmp/test.html
2 | <h1>Heading Here</h1>
^ Hardcoded <script> tag
3 | <a href='/about' title='About Us'>About</a>
^ Hardcoded <script> tag (continued)
Although it looks like it's kind of working from the above output, I think it will actually report a problem for any tags it sees inside the script block.
To fix this, you would have to make it parse the script contents as HTML and run the linter over it - if you'd like to have a go at creating a pull request for this, please feel free to :) It's unlikely I will have any time to look at this for a while. Thanks!
Thanks for the swift reply. I saw the similar output when I ignored script tags. Your explanation makes sense, can see why the output was like that. I'll Work on the solution and will submit PR in coming weeks. Thanks again!!
@achintverma that would be awesome, thank you! :+1:
It's not working with code like