commit a3102cd4cf7ff302ade7c704375804f857fe4449
parent da6788350854dab19eba264abf760970142c186d
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 7 May 2017 19:49:58 +0200
syntax: xml: recognize an XML file also by its first line
Some .rdf files are XML, but the .rdf extension seems to be used
also for other things. So... use the 'header' mechanism.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/syntax/xml.nanorc b/syntax/xml.nanorc
@@ -1,6 +1,7 @@
## Here is an example for XML files.
syntax "xml" "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$"
+header "<\?xml.*version=.*\?>"
magic "(XML|SGML) (sub)?document text"
comment "<!--|-->"