nanorc/xml.nanorc

26 lines
582 B
Plaintext
Raw Normal View History

2010-07-28 17:15:43 -05:00
## Here is an example for xml files.
##
2019-12-18 22:08:43 -05:00
syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng|vue|mei|musicxml)$"
header "<\?xml.*version=.*\?>"
magic "(XML|SGML) (sub)?document"
comment "<!--|-->"
2010-07-28 17:15:43 -05:00
color white "^.+$"
# Attributes
2010-07-28 17:15:43 -05:00
color green start="<" end=">"
color brightgreen "=\"[^\"]*\""
# Opening tags
color brightcyan "<[^/][^> ]*"
color brightcyan ">"
# Closing tags
color cyan "</[^> ]*>"
# Self-closing part
color cyan "/>"
2010-07-28 17:15:43 -05:00
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
color red "&[^;]*;"
2016-12-06 22:19:02 +01:00
## Trailing spaces
color ,green "[[:space:]]+$"