-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
XHTML? #3421
Comments
Doesn't the HTML syntax highlighting (you can try it with |
It does work, but XHTML has a much stricter syntax. For example, all tags must be closed with no exceptions, attributes must be lowercase, attributes must have a value, etc. |
Micro's syntax highlighting system is based on regular expressions and thus not advanced enough to pair (nested) tags or do any other kind of advanced syntax analysis. I guess the syntax highlighting could help with some simple things such as only coloring lowercase attributes that end with a '=', but in general you would be better off using a linter (or a language server) to catch mistakes. As far as I know the HTML syntax should be a superset of XHTML syntax and as such sufficient to highlight any correctly formatted XHTML file. That said if you do want to give making a bespoke XHTML syntax a go the html.yaml syntax would be a good starting point. Just copy the contents of that file to |
Description of the problem or steps to reproduce
I want an XHTML syntax highlighter. Shouldn't be that difficult to implement. Currently it defaults to XML.
Specifications
Commit hash: doesn't show, OS reports 2.0.9-1ubuntu0.22.04.2, but I took my time to look through the syntax files in this repo to make sure there's no such thing that I want right now.
OS: Ubuntu Jammy
Terminal: Alacritty
The text was updated successfully, but these errors were encountered: