Closed 43081j closed 2 years ago
one thing to consider maybe is people doing stuff like this:
<div><!-- <html> --></div>
i suppose that'd make it fall over... but without an absurd amount of pre-parsing im not sure how we can catch such things
@43081j , if you like i can checkout this branch, link it to the lit-a11y eslint repo, and run the test suite?
Will that provide any assurance that everything still works as expected?
Sure that would be useful. I think I just need to add some more tests here too for the edge cases, will probably have time tomorrow
@stramel i've updated it, could you give it another quick look? just changed from an includes
to a regex
Fixes #115
This is another utility one really, adding the ability for template analyzer to parse HTML documents.
It always parses as a fragment at the min, which means something like this:
would be parsed as
Foo
essentially.by adding this switch in the constructor, we'll parse it as a document instead, maintaining the html/body tags.
cc @stramel
Part im not sure of is if the condition is strong enough, i.e. checking for
includes('<html')
. seems incredibly unlikely anyone can ever have a<html-something-else
tag so maybe its ok?Also looks like prettier being bumped now decided to re-format URLs