From e58ac2780e96fe1b33275066891bf2dd03822d56 Mon Sep 17 00:00:00 2001 From: "Matth?us G. Chajdas" Date: Wed, 6 Mar 2019 19:44:06 +0100 Subject: Fix #1494. This fixes the catastrophic backtracking which previously occured for strings like "\057hom\145/e2\071501\057pub\154ic_\150tml\057a --- pygments/lexers/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index 86d8c37a..31bc7e94 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -76,7 +76,7 @@ class BashLexer(RegexLexer): (r'&&|\|\|', Operator), ], 'data': [ - (r'(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"', String.Double), + (r'(?s)\$?"(\\.|[^"\\$])*"', String.Double), (r'"', String.Double, 'string'), (r"(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), (r"(?s)'.*?'", String.Single), -- cgit v1.2.1