summaryrefslogtreecommitdiff
path: root/pygments/lexers/php.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-17 17:32:05 +0200
committerGeorg Brandl <georg@python.org>2014-10-17 17:32:05 +0200
commitf7fd4050961f9b64b5c0a34fd8f5911127805862 (patch)
treee1f767c296571d5d99f445235f8eb375af479c93 /pygments/lexers/php.py
parent33cc6d165e96ceb19cda82925eeb71a1cfb15c14 (diff)
downloadpygments-f7fd4050961f9b64b5c0a34fd8f5911127805862.tar.gz
Closes #1043: fix PHP closing tag recognition
Diffstat (limited to 'pygments/lexers/php.py')
-rw-r--r--pygments/lexers/php.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py
index 091cf93f..5d1d650d 100644
--- a/pygments/lexers/php.py
+++ b/pygments/lexers/php.py
@@ -148,7 +148,8 @@ class PhpLexer(RegexLexer):
(r'/\*.*?\*/', Comment.Multiline),
(r'(->|::)(\s*)(' + _ident_inner + ')',
bygroups(Operator, Text, Name.Attribute)),
- (r'[~!%^&*+=|:.<>/?@-]+', Operator),
+ (r'[~!%^&*+=|:.<>/@-]+', Operator),
+ (r'\?', Operator), # don't add to the charclass above!
(r'[\[\]{}();,]+', Punctuation),
(r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
(r'(function)(\s*)(?=\()', bygroups(Keyword, Text)),