summaryrefslogtreecommitdiff
path: root/pygments/lexers/html.py
diff options
context:
space:
mode:
authorAnteru <bitbucket@ca.sh13.net>2019-04-30 15:47:45 +0000
committerAnteru <bitbucket@ca.sh13.net>2019-04-30 15:47:45 +0000
commit83e159f05ec8dae7d6e52140b23b363d4c3b18f2 (patch)
tree1fa06af4657f37b48cc798a662a0986fb004ba52 /pygments/lexers/html.py
parent836d98cc163ea0dcb1b60ef1e536fdacb351d78a (diff)
parenta0fc52727aaed41c8e09c87996de842117872afb (diff)
downloadpygments-83e159f05ec8dae7d6e52140b23b363d4c3b18f2.tar.gz
Merged in Praetonus/pygments-main/pony (pull request #627)
Add lexer for the Pony language
Diffstat (limited to 'pygments/lexers/html.py')
-rw-r--r--pygments/lexers/html.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/pygments/lexers/html.py b/pygments/lexers/html.py
index 24733748..091379ce 100644
--- a/pygments/lexers/html.py
+++ b/pygments/lexers/html.py
@@ -5,7 +5,7 @@
Lexers for HTML, XML and related markup.
- :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.
"""
@@ -220,7 +220,7 @@ class XmlLexer(RegexLexer):
(r'/?\s*>', Name.Tag, '#pop'),
],
'attr': [
- ('\s+', Text),
+ (r'\s+', Text),
('".*?"', String, '#pop'),
("'.*?'", String, '#pop'),
(r'[^\s>]+', String, '#pop'),
@@ -313,7 +313,7 @@ class HamlLexer(ExtendedRegexLexer):
include('css'),
(r'%[\w:-]+', Name.Tag, 'tag'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -330,8 +330,8 @@ class HamlLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(RubyLexer)),
- (r'\[' + _dot + '*?\]', using(RubyLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)),
+ (r'\[' + _dot + r'*?\]', using(RubyLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -340,7 +340,7 @@ class HamlLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -373,7 +373,7 @@ class HamlLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -422,7 +422,7 @@ class ScamlLexer(ExtendedRegexLexer):
include('css'),
(r'%[\w:-]+', Name.Tag, 'tag'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -442,8 +442,8 @@ class ScamlLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)),
- (r'\[' + _dot + '*?\]', using(ScalaLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
+ (r'\[' + _dot + r'*?\]', using(ScalaLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -452,7 +452,7 @@ class ScamlLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -485,7 +485,7 @@ class ScamlLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -530,7 +530,7 @@ class PugLexer(ExtendedRegexLexer):
'content': [
include('css'),
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
- (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)',
+ (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
bygroups(Comment, Comment.Special, Comment),
'#pop'),
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
@@ -551,8 +551,8 @@ class PugLexer(ExtendedRegexLexer):
'tag': [
include('css'),
- (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)),
- (r'\[' + _dot + '*?\]', using(ScalaLexer)),
+ (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
+ (r'\[' + _dot + r'*?\]', using(ScalaLexer)),
(r'\(', Text, 'html-attributes'),
(r'/[ \t]*\n', Punctuation, '#pop:2'),
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
@@ -561,7 +561,7 @@ class PugLexer(ExtendedRegexLexer):
'plain': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],
@@ -594,7 +594,7 @@ class PugLexer(ExtendedRegexLexer):
'filter-block': [
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
- (r'(#\{)(' + _dot + '*?)(\})',
+ (r'(#\{)(' + _dot + r'*?)(\})',
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
(r'\n', Text, 'root'),
],