-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
XML Formatting Fails for Elements with Dots in Names #888
Comments
Should we change the regexp in markup to include periods? Is there anything that could break if we do? |
The XML specification explicitly allows the But HTML only allows alphanumeric ASCII characters as tag names: Since Prism is not a parser it should be more permissive and allow the |
Well we do have tests now, don't we? |
Allowing the
This is recognized as a HTML-tag: |
Because it allows HTML:
|
Should we allow the exclamation point though? |
If I disallow the exclamation point, then the following line fails:
because Since HTML only allows alpha-numeric tags ànyway we could do this:
|
If you have an XML element with dots in the element name, at least for the root element, that element does not get syntax highlighting applied.
Attached, please find a ZIP file containing two PrismJS samples. The
not-working/
one uses an element name ofandroid.support.v7.widget.CardView
, and that element does not get syntax-highlighted (though child elements do). Theworking/
one removes the dots (for a fictitiousandroidsupportv7widgetCardView
element), and that element does get syntax-highlighted. The results are reproducible on Firefox 44, Chromium 48, and the Android 6.0WebView
, at minimum.prismjs-bug.zip
Let me know if you need additional information -- thanks!
The text was updated successfully, but these errors were encountered: