dotfiles-pub/common/nano/syntax/xml.nanorc

26 lines
582 B
Plaintext

## Here is an example for xml files.
##
syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng|vue|mei|musicxml)$"
header "<\?xml.*version=.*\?>"
magic "(XML|SGML) (sub)?document"
comment "<!--|-->"
color white "^.+$"
# Attributes
color green start="<" end=">"
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 "&[^;]*;"
## Trailing spaces
color ,green "[[:space:]]+$"