2020-04-20 20:15:43 +03:00
|
|
|
## Syntax highlighting for XML files.
|
2014-05-14 15:16:40 +04:00
|
|
|
|
2018-02-07 13:25:46 +03:00
|
|
|
syntax xml "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$"
|
2017-05-07 20:49:58 +03:00
|
|
|
header "<\?xml.*version=.*\?>"
|
2017-11-19 13:10:53 +03:00
|
|
|
magic "(XML|SGML) (sub)?document"
|
2016-05-25 23:13:50 +03:00
|
|
|
comment "<!--|-->"
|
2014-05-14 15:16:40 +04:00
|
|
|
|
2022-04-04 13:06:50 +03:00
|
|
|
# First the entire content of the tag (for the attributes):
|
2021-10-27 12:06:40 +03:00
|
|
|
color green start="<" end=">"
|
2015-06-28 21:15:41 +03:00
|
|
|
|
2022-02-16 14:29:14 +03:00
|
|
|
# The angled brackets and the name of the tag:
|
2022-04-03 18:22:48 +03:00
|
|
|
color cyan "<[^> ]+|/?>"
|
2015-06-28 21:15:41 +03:00
|
|
|
|
|
|
|
# The strings inside the tag:
|
2020-07-27 11:47:27 +03:00
|
|
|
color magenta ""[^"]*""
|
2015-06-28 21:15:41 +03:00
|
|
|
|
2022-04-03 18:22:48 +03:00
|
|
|
# Prolog stuff:
|
|
|
|
color #888 "<\?.+\?>|<!DOCTYPE[^>]+>|\]>"
|
|
|
|
color #888 start="<!DOCTYPE[^>]*$" end="^[^<]*>"
|
|
|
|
|
2015-06-28 21:15:41 +03:00
|
|
|
# Comments:
|
2008-06-01 01:55:21 +04:00
|
|
|
color yellow start="<!--" end="-->"
|
2015-06-28 21:15:41 +03:00
|
|
|
|
2022-04-04 13:06:50 +03:00
|
|
|
# Entities (custom and predefined):
|
|
|
|
color pink "&[^; ]+;"
|
|
|
|
color red "&(amp|apos|gt|lt|quot);"
|