nano

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

commit b568705eec276f06876b0ff2160831c59944d0b0
parent fe42eb7a1a71aa0e1cfc225564bef063a6f3e84c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  3 Apr 2022 17:22:48 +0200

syntax: xml: colorize /> properly, and colorize prolog tags differently

Use lightgrey for the prolog tags, as they normally are unimportant
boiler-plate stuff.  Comments are likely to be more relevant.

Any /> is part of the tag itself, not of the attributes.

Diffstat:
Msyntax/xml.nanorc | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/syntax/xml.nanorc b/syntax/xml.nanorc @@ -9,13 +9,16 @@ comment "<!--|-->" color green start="<" end=">" # The angled brackets and the name of the tag: -color cyan "<[^> ]+|>" +color cyan "<[^> ]+|/?>" # The strings inside the tag: color magenta ""[^"]*"" +# Prolog stuff: +color #888 "<\?.+\?>|<!DOCTYPE[^>]+>|\]>" +color #888 start="<!DOCTYPE[^>]*$" end="^[^<]*>" + # Comments: -color yellow start="<!DOCTYPE" end="[/]?>" color yellow start="<!--" end="-->" # Escapes: