diff options
| author | Anteru <bitbucket@ca.sh13.net> | 2018-11-24 16:37:35 +0000 |
|---|---|---|
| committer | Anteru <bitbucket@ca.sh13.net> | 2018-11-24 16:37:35 +0000 |
| commit | c85d52dfad2b5b1f9783e88ac52d893e30f034d2 (patch) | |
| tree | eb3ef2aa70d2fbb7a1a307042038405929aa9650 /pygments/util.py | |
| parent | ee4cc2ef1bc96d44e93c1ad881e7b533bc83b8ae (diff) | |
| parent | d13cb73dc075a689f17e453a392429eb880b2eca (diff) | |
| download | pygments-git-c85d52dfad2b5b1f9783e88ac52d893e30f034d2.tar.gz | |
Merged in Reedbeta/pygments-main/hlsl-lexer (pull request #675)
Add HLSL lexer
Approved-by: Anteru <bitbucket@ca.sh13.net>
Diffstat (limited to 'pygments/util.py')
| -rw-r--r-- | pygments/util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pygments/util.py b/pygments/util.py index 07b662d0..45070063 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -5,7 +5,7 @@ Utility functions. - :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -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) |
