2020-04-20 17:15:43 +00:00
|
|
|
## Syntax highlighting for HTML.
|
2014-05-16 20:21:34 +00:00
|
|
|
|
2018-02-07 10:25:46 +00:00
|
|
|
syntax html "\.html?$"
|
2017-11-19 10:10:53 +00:00
|
|
|
magic "HTML document"
|
2016-05-25 20:13:50 +00:00
|
|
|
comment "<!--|-->"
|
2014-05-16 20:21:34 +00:00
|
|
|
|
2019-10-25 15:27:14 +00:00
|
|
|
formatter tidy -m -q
|
|
|
|
|
2017-01-08 10:27:37 +00:00
|
|
|
# Tags:
|
2017-08-03 19:14:23 +00:00
|
|
|
color cyan "<[[:alpha:]/!?][^>]*>"
|
2017-01-08 10:27:37 +00:00
|
|
|
# Bold, italic, and underlined:
|
|
|
|
color brightmagenta "</?[biu]>"
|
|
|
|
|
|
|
|
# Named character references:
|
2014-02-22 18:57:24 +00:00
|
|
|
color red "&[^;[:space:]]*;"
|
2016-05-25 20:13:50 +00:00
|
|
|
|
2017-01-08 10:27:37 +00:00
|
|
|
# Attributes:
|
2019-10-23 08:07:41 +00:00
|
|
|
color red "\<(abbr|accept(-charset)?|accesskey|action|alink|align|alt|archive|axis|background|bgcolor|border)="
|
|
|
|
color red "\<(cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)="
|
|
|
|
color red "\<(content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|disabled|enctype)="
|
|
|
|
color red "\<(for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)="
|
|
|
|
color red "\<(label|lang|link|longdesc|margin(height|width)|maxlength|media|method|multiple)="
|
|
|
|
color red "\<(name|nohref|noresize|noshade|object|onclick|onfocus|onload|onmouseover|profile|readonly|rel|rev)="
|
|
|
|
color red "\<(rows(pan)?|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary)="
|
|
|
|
color red "\<(tabindex|target|text|title|type|usemap|valign|value(type)?|vlink|vspace|width|xmlns|xml:space)="
|
|
|
|
|
|
|
|
# Strings:
|
2021-10-27 07:45:42 +00:00
|
|
|
color green ""([^"\]|\\.)*""
|
2017-01-08 10:27:37 +00:00
|
|
|
|
|
|
|
# Comments:
|
2016-05-25 20:13:50 +00:00
|
|
|
color yellow start="<!--" end="-->"
|