summaryrefslogtreecommitdiff
path: root/pygments/lexers/javascript.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-09-06 11:55:52 +0200
committerGeorg Brandl <georg@python.org>2020-09-06 11:55:52 +0200
commit603e8eddbf413deeb452ff110431da001e795438 (patch)
tree16c142fbcdd30defd672694611747d7da2f2f656 /pygments/lexers/javascript.py
parent3a2752177f37188fe995d262beb94a338dca612a (diff)
downloadpygments-git-603e8eddbf413deeb452ff110431da001e795438.tar.gz
all: fixup remaining regexlint warnings
Diffstat (limited to 'pygments/lexers/javascript.py')
-rw-r--r--pygments/lexers/javascript.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py
index 9428932c..335af320 100644
--- a/pygments/lexers/javascript.py
+++ b/pygments/lexers/javascript.py
@@ -263,7 +263,7 @@ class LiveScriptLexer(RegexLexer):
default('#pop'),
],
'root': [
- (r'^(?=\s|/)', Text, 'slashstartsregex'),
+ (r'\A(?=\s|/)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'(?:\([^()]+\))?[ ]*[~-]{1,2}>|'
r'(?:\(?[^()\n]+\)?)?[ ]*<[~-]{1,2}', Name.Function),
@@ -1038,7 +1038,7 @@ class CoffeeScriptLexer(RegexLexer):
_operator_re = (
r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|'
r'\|\||\\(?=\n)|'
- r'(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&\|\^/])=?')
+ r'(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&|\^/])=?')
flags = re.DOTALL
tokens = {
@@ -1066,7 +1066,7 @@ class CoffeeScriptLexer(RegexLexer):
],
'root': [
include('commentsandwhitespace'),
- (r'^(?=\s|/)', Text, 'slashstartsregex'),
+ (r'\A(?=\s|/)', Text, 'slashstartsregex'),
(_operator_re, Operator, 'slashstartsregex'),
(r'(?:\([^()]*\))?\s*[=-]>', Name.Function, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),