summaryrefslogtreecommitdiff
path: root/pygments/util.py
diff options
context:
space:
mode:
authorAdam Gomaa <code@adam.gomaa.us>2008-05-14 15:09:43 -0400
committerAdam Gomaa <code@adam.gomaa.us>2008-05-14 15:09:43 -0400
commitbe2e60ac7eb6b99d96a4b5abf15ec65beb29ab32 (patch)
treec342f613f1c65c9478ec1876a4d9dee3c6427364 /pygments/util.py
parent732fa805f03e6e89a2f2711aea3d83f9e8c66a65 (diff)
downloadpygments-be2e60ac7eb6b99d96a4b5abf15ec65beb29ab32.tar.gz
Fixed looks_like_xml's tag regex so it doesn't do inordinate amounts of backtracking (making it O(2^n))
Diffstat (limited to 'pygments/util.py')
-rw-r--r--pygments/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/util.py b/pygments/util.py
index 07140187..8232964c 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -20,7 +20,7 @@ doctype_lookup_re = re.compile(r'''(?smx)
"[^"]*")
[^>]*>
''')
-tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</\1>(?uism)')
+tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>(?uism)')
class ClassNotFound(ValueError):