nano/syntax/xml.nanorc
Benno Schulenberg 0e1d45dc36 tweaks: fold some regexes together, and trim or improve some comments
Also, trim some whitespace and group one rule better.

Also, fix a stray closing parenthesis in the JSON syntax,
and add the missing slash to the possible escaped characters.
(Reference: https://www.json.org/json-en.html.)

Also, improve the ending of multiline strings in the Rust syntax.
2021-10-27 11:25:45 +02:00

23 lines
520 B
Plaintext

## Syntax highlighting for XML files.
syntax xml "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$"
header "<\?xml.*version=.*\?>"
magic "(XML|SGML) (sub)?document"
comment "<!--|-->"
# The entire content of the tag:
color green start="<" end=">"
# The start and the end of the tag:
color cyan "<[^> ]+" ">"
# The strings inside the tag:
color magenta ""[^"]*""
# Comments:
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
# Escapes:
color red "&[^;]*;"