diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-25 10:16:01 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-25 10:16:01 -0500 |
commit | 1d27bf898a160ca20f924a1cbff534a07e9122dd (patch) | |
tree | 486f0494e9f0024b01d7e96c9c7a670078ebd6a7 | |
parent | 7f75a936f340600ad599a24c548ebcea2171dc25 (diff) | |
download | markdown-1d27bf898a160ca20f924a1cbff534a07e9122dd.tar.gz markdown-1d27bf898a160ca20f924a1cbff534a07e9122dd.tar.bz2 markdown-1d27bf898a160ca20f924a1cbff534a07e9122dd.zip |
Consistant parsing of attr_lists in Python3.3
Fixes #194. The NAME_RE regex was failing in Python 3.3 with the range
`\u10000-\ueffff`. Also, in Python =< 3.2 the range `\u0300-\u036f` matches
a colon but not in Python 3.3.
-rw-r--r-- | markdown/extensions/attr_list.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 3a79d85..a61e2be 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -69,8 +69,8 @@ class AttrListTreeprocessor(markdown.treeprocessors.Treeprocessor): INLINE_RE = re.compile(r'^%s' % BASE_RE) NAME_RE = re.compile(r'[^A-Z_a-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02ff\u0370-\u037d' r'\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef' - r'\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\u10000-\ueffff' - r'\-\.0-9\u00b7\u0300-\u036f\u203f-\u2040]+') + r'\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd' + r'\:\-\.0-9\u00b7\u0300-\u036f\u203f-\u2040]+') def run(self, doc): for elem in doc.getiterator(): |