-
Notifications
You must be signed in to change notification settings - Fork 766
Whitespace token modernization - html/xml lexers - regarding #1905 #2012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
pygments/lexers/html.py
Outdated
| 'html-attribute-value'), | ||
| (r'[\w:-]+', Name.Attribute), | ||
| (r'\)', Text, '#pop'), | ||
| (r'\)', Whitespace, '#pop'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parenthesis is not whitespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right! This was by mistake
| @@ -0,0 +1,17 @@ | |||
| !!! XML | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files in examplefiles/ usually end in the normal extension of the language, unlike snippets/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rename it.
|
Merged |
|
There is still #2012 (comment) though. |
|
Thanks, just fixed both issues mentioned in the comments. |
This PR contains a more significant change to the xml lexer. I changed the tag detection to look more like the html ones, where a Tag token is used for the name, but punctuation tokens for characters like
[<>\\].I am not sure, whether the xml lexer was kept intentionally simple. That's why secluded this change into it's own commits here.