Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): use element name parser to extract name for raw parser
In the existing code, if the raw element name is successfully parsed, it immediately attempts to parse the attributes, without checking for whitespace or a closing `>`. This means that something like `<scripts>` would be parsed as a `<script>` tag with a boolean attribute of `s` (the last character of the tag name). This would then give a confusing error about mismatched tags as the closing `</scripts>` tag was actually parsed correctly. This commit fixes this issue by delegating to the elementNameParser, which checks for whitespace or a closing `>`, and then compares the names of the elements.
- Loading branch information