diff options
author | David Baumgold <david@davidbaumgold.com> | 2016-12-29 00:26:27 -0500 |
---|---|---|
committer | David Baumgold <david@davidbaumgold.com> | 2016-12-29 00:26:27 -0500 |
commit | 9c876611718bdaaa54b918a97e33a6f41254ab9b (patch) | |
tree | 63aee627ba5af7a34205f864c46cea0381f8a7f4 | |
parent | 5d4c583b5599948995e31eb88a4fc9533c4f331c (diff) | |
download | pygments-git-9c876611718bdaaa54b918a97e33a6f41254ab9b.tar.gz |
Pull flags out of regular expressions
-rw-r--r-- | pygments/util.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pygments/util.py b/pygments/util.py index 07b662d0..7abcc5fd 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -14,7 +14,7 @@ import sys split_path_re = re.compile(r'[/\\ ]') -doctype_lookup_re = re.compile(r'''(?smx) +doctype_lookup_re = re.compile(r''' (<\?.*?\?>)?\s* <!DOCTYPE\s+( [a-zA-Z_][a-zA-Z0-9]* @@ -23,8 +23,9 @@ doctype_lookup_re = re.compile(r'''(?smx) "[^"]*")? ) [^>]*> -''') -tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>(?uism)') +''', re.DOTALL | re.MULTILINE | re.VERBOSE) +tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>', + re.UNICODE | re.IGNORECASE | re.DOTALL | re.MULTILINE) xml_decl_re = re.compile(r'\s*<\?xml[^>]*\?>', re.I) |