Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix grammar bug with XML namespaces that are also valid HTML tags and tag names that start with a valid HTML tag before a hyphen #150
Description of the Change
Using XML namespaces in HTML is generally tolerated by the grammar even though it's not valid HTML. For this reason the
Before this PR, this:
would be falsely tokenized as:
Now it will be tokenized as just:
changed the title from
Fix grammar bug with XML namespaces that are also valid HTML tags
Fix grammar bug with XML namespaces that are also valid HTML tags and tag names that start with a valid HTML tag before a hyphen
Jan 10, 2017
referenced this pull request
May 26, 2017
We have slowly been transitioning away from using
Okay - I think it should be safe to remove the
@50Wliu I had to alter two of your regexes to prevent the pattern from matching self closing tags. I also added some tests for that. I'm not entirely happy with my solution but it's the best i came up with.
What I changed:
On the one hand the regex is pretty complex right now and a simpler one would be nice, on the other hand if someone still uses self-closing
No problem. You're doing a great job managing all the community contributions. This sure is a whole lot of work; many thanks for that!
I updated the PR, but once I rebased I noticed that 6916c01 already fixed the issue for those tags, so I just left it like it was.