From: Benno Schulenberg Date: Sun, 28 Jun 2015 18:15:41 +0000 (+0000) Subject: Recognizing several more kinds of XML files. X-Git-Tag: v2.4.2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b60f555843d1a8320ab94f911d0e746e4f337953;p=nano.git Recognizing several more kinds of XML files. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5276 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 732b6a05..40ec507f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ line ending -- it was done already in the encompassing 'if'. * src/text.c: Unwrap some lines, rewrap some others more logically, plus several other esthetic tweaks. + * doc/syntax/xml.nanorc: Recognize many more kinds of XML files. + This addresses Debian bug #790017 reported by Emmanuel Bourg. + Also colour the strings in tags differently, and add some comments. 2015-06-27 Benno Schulenberg * src/text.c (do_undo, add_undo): Skip undoing a backspace *only* when diff --git a/doc/syntax/xml.nanorc b/doc/syntax/xml.nanorc index 69982ea8..10e6867b 100644 --- a/doc/syntax/xml.nanorc +++ b/doc/syntax/xml.nanorc @@ -1,11 +1,20 @@ ## Here is an example for XML files. -syntax "xml" "\.([jrs]html?|sgml?|xml|xslt?)$" +syntax "xml" "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$" magic "(XML|SGML) (sub)?document text" +# The entire content of the tag: color green start="<" end=">" -color cyan "<[^> ]+" -color cyan ">" + +# The start and the end of the tag: +color cyan "<[^> ]+" ">" + +# The strings inside the tag: +color magenta "\"[^"]*\"" + +# Comments: color yellow start="" color yellow start="" + +# Escapes: color red "&[^;]*;"