From c439163434dd51eb20dec3d69653d12fd33f37f9 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 10 Sep 2010 00:18:34 -0400 Subject: [PATCH] make XML parsing slightly more flexible --HG-- branch : pmacs2 --- mode/xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/xml.py b/mode/xml.py index d4b7a48..2b351e5 100644 --- a/mode/xml.py +++ b/mode/xml.py @@ -20,9 +20,9 @@ class CommentGrammar(Grammar): rules = [PatternRule('data', '(?:[^-]|-(?!-)|--(?!>))+')] class TagGrammar(Grammar): rules = [ - PatternRule('attrname', '[a-zA-Z_][a-zA-Z0-9_]+(?==)'), + PatternRule('attrname', '[a-zA-Z_][-a-zA-Z0-9_]*(?==)'), PatternRule('namespace', '[a-zA-Z_]+(?=:)'), - PatternRule('name', '[a-zA-Z_][a-zA-Z0-9_]*'), + PatternRule('name', '[a-zA-Z_][-a-zA-Z0-9_]*'), PatternRule('delimiter', '[:/=]'), RegionRule('string', '"', StringGrammar1, '"'), RegionRule('string', "'", StringGrammar2, "'"),