mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 22:59:38 +03:00
40f8ca0d07
Attribute names that are a part of another word should not be colored, nor should attribute names within strings. This addresses the other half of https://savannah.gnu.org/patch/?9865. Original-patch-by: Ryan Westlund <rlwestlund@gmail.com>
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
## Here is an example for HTML.
|
|
|
|
syntax html "\.html?$"
|
|
magic "HTML document"
|
|
comment "<!--|-->"
|
|
|
|
# Tags:
|
|
color cyan "<[[:alpha:]/!?][^>]*>"
|
|
# Bold, italic, and underlined:
|
|
color brightmagenta "</?[biu]>"
|
|
|
|
# Named character references:
|
|
color red "&[^;[:space:]]*;"
|
|
|
|
# Attributes:
|
|
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:
|
|
color green ""(\\.|[^"])*""
|
|
|
|
# Comments:
|
|
color yellow start="<!--" end="-->"
|