Open jonatanpedersen opened 7 years ago
At a glance it looks like the problem is that a <h1>
tag closes a <p>
tag, that is, <p>par...<h1>Heading</h1>
is valid html and the <p>
tag will extend to the beginning of the heading. Then the </p>
tag comes later and the parser does something weird. I'll look into this later today.
When this error happens it also never calls the end
function on all the rules which can cause problems the next time you call the lint function.
Thanks for creating this awesome library. We are replacing all our old mocha/cheerio tests with htmllint + a plugin that we are making with some domain specific rules.
On of the problems that we have run in to is that we get this "Cannot get options for index" error when heading elements are nested inside paragraph elements:
We encounter this error:
Of course headings should not be nested inside paragraphs. But that is a different issue :)
I also checked a couple of other things like putting a list inside a paragraph:
and a heading inside a table:
none of which produces the error.
It looks like it is somehow specific to the combination of paragraphs and headings, and something to do with inline configurations.
Best regards, Jonatan