Skip to content

Commit

Permalink
fix(xml): Enhance with different opening/closing tag colors
Browse files Browse the repository at this point in the history
Originally proposed in scopatz#378
  • Loading branch information
earboxer authored and galenguyer committed Nov 2, 2022
1 parent 81f87fc commit af0b702
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions xml.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ magic "(XML|SGML) (sub)?document"
comment "<!--|-->"

color white "^.+$"
# Attributes
color green start="<" end=">"
color cyan "<[^> ]+"
color cyan ">"
color brightgreen "=\"[^\"]*\""
# Opening tags
color brightcyan "<[^/][^> ]*"
color brightcyan ">"
# Closing tags
color cyan "</[^> ]*>"
# Self-closing part
color cyan "/>"
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
color red "&[^;]*;"
Expand Down

0 comments on commit af0b702

Please sign in to comment.