nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 40f8ca0d07e3900f33123480d9e0c7a6fdbdfd2f
parent aae752912ea8142a540de901e1a203d679c12583
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 23 Oct 2019 10:07:41 +0200

syntax: html: colorize only full attributes, and colorize strings later

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>

Diffstat:
Msyntax/html.nanorc | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/syntax/html.nanorc b/syntax/html.nanorc @@ -11,18 +11,19 @@ color brightmagenta "</?[biu]>" # Named character references: color red "&[^;[:space:]]*;" -# Strings: -color green ""(\\.|[^"])*"" # 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)=" +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="-->"