From 81e5b57d74adb3ae7ce0f88a9514600fee23714b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 4 Apr 2022 12:06:50 +0200 Subject: [PATCH] syntax: xml: colorize user-defined entities differently Also improve two comments. --- syntax/xml.nanorc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/syntax/xml.nanorc b/syntax/xml.nanorc index fe14692c..d5e41e44 100644 --- a/syntax/xml.nanorc +++ b/syntax/xml.nanorc @@ -5,7 +5,7 @@ header "<\?xml.*version=.*\?>" magic "(XML|SGML) (sub)?document" comment "" -# The entire content of the tag: +# First the entire content of the tag (for the attributes): color green start="<" end=">" # The angled brackets and the name of the tag: @@ -21,5 +21,6 @@ color #888 start="]*$" end="^[^<]*>" # Comments: color yellow start="" -# Escapes: -color red "&[^;]*;" +# Entities (custom and predefined): +color pink "&[^; ]+;" +color red "&(amp|apos|gt|lt|quot);"