summaryrefslogtreecommitdiff
path: root/tests/test_html_lexer.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-12-17 07:35:48 +0100
committerGeorg Brandl <georg@python.org>2020-12-17 07:39:37 +0100
commit7958cd6c53215ac2caeb6812aaeab5e8029a43ad (patch)
treed47a0a2f5cf93890659db4bc254112bdedbe6caf /tests/test_html_lexer.py
parenta50791866169e94bb891c9e069c79f69a5189116 (diff)
downloadpygments-git-7958cd6c53215ac2caeb6812aaeab5e8029a43ad.tar.gz
Fix backtracking string regexes in JavascriptLexer und TypescriptLexer.
fixes #1637
Diffstat (limited to 'tests/test_html_lexer.py')
-rw-r--r--tests/test_html_lexer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_html_lexer.py b/tests/test_html_lexer.py
index 62f1c8d4..9ac72e33 100644
--- a/tests/test_html_lexer.py
+++ b/tests/test_html_lexer.py
@@ -65,7 +65,9 @@ def test_long_unclosed_javascript_fragment(lexer_html):
tokens_body = [
(Token.Name.Other, 'alert'),
(Token.Punctuation, '('),
- (Token.Literal.String.Double, '"hi"'),
+ (Token.Literal.String.Double, '"'),
+ (Token.Literal.String.Double, 'hi'),
+ (Token.Literal.String.Double, '"'),
(Token.Punctuation, ')'),
(Token.Punctuation, ';'),
]