From af0b702ee50e6385eb90333f0796e5f0c4fc1bba Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 19 Mar 2021 12:28:49 -0400 Subject: [PATCH] fix(xml): Enhance with different opening/closing tag colors Originally proposed in https://github.com/scopatz/nanorc/pull/378 --- xml.nanorc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xml.nanorc b/xml.nanorc index 809a0484..6d4e8f0a 100644 --- a/xml.nanorc +++ b/xml.nanorc @@ -7,9 +7,16 @@ magic "(XML|SGML) (sub)?document" comment "" color white "^.+$" +# Attributes color green start="<" end=">" -color cyan "<[^> ]+" -color cyan ">" +color brightgreen "=\"[^\"]*\"" +# Opening tags +color brightcyan "<[^/][^> ]*" +color brightcyan ">" +# Closing tags +color cyan " ]*>" +# Self-closing part +color cyan "/>" color yellow start="" color yellow start="" color red "&[^;]*;"