summaryrefslogtreecommitdiff
path: root/pygments/lexers/javascript.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2018-11-28 16:11:03 +0100
committerGeorg Brandl <georg@python.org>2018-11-28 16:11:03 +0100
commit0963c0f6c6b3ddfe317fbeee7b956262e95ff4cf (patch)
tree4ffa94469b9c886f18ac1328decce2f4c367bda4 /pygments/lexers/javascript.py
parentfdf7c168d247782137ef6324309585d6ba047db4 (diff)
parent8ec816d3c681b15247d5dac12bc5d291703c8ad0 (diff)
downloadpygments-git-0963c0f6c6b3ddfe317fbeee7b956262e95ff4cf.tar.gz
Merge heads.
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 663557ab..840ce9ed 100644
--- a/pygments/lexers/javascript.py
+++ b/pygments/lexers/javascript.py
@@ -535,8 +535,8 @@ class TypeScriptLexer(RegexLexer):
}
def analyse_text(text):
- if re.search('^(import.+(from\s+)?["\']|'
- '(export\s*)?(interface|class|function)\s+)',
+ if re.search(r'^(import.+(from\s+)?["\']|'
+ r'(export\s*)?(interface|class|function)\s+)',
text, re.MULTILINE):
return 1.0
@@ -1015,7 +1015,7 @@ class ObjectiveJLexer(RegexLexer):
}
def analyse_text(text):
- if re.search('^\s*@import\s+[<"]', text, re.MULTILINE):
+ if re.search(r'^\s*@import\s+[<"]', text, re.MULTILINE):
# special directive found in most Objective-J files
return True
return False