From 6980ee646d555527488511d7b929073c0e6f27d3 Mon Sep 17 00:00:00 2001 From: davidodenwald Date: Thu, 1 Dec 2022 19:50:46 +0100 Subject: [PATCH] remove unnecessary escape --- src/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.ts b/src/parser.ts index 8c26355..e16984b 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -10,7 +10,7 @@ import { } from "./jinja"; const regex = - /(?
(?\n)?(\s*?))(?{{\s*(?'([^']|\\')*'|"([^"]|\\")*"|[\S\s]*?)\s*}}|{%(?[-\+]?)\s*(?(?for|endfor|if|else|endif|macro|endmacro|call|endcall|filter|endfilter|set|endset|include|import|from|extends|block|endblock)('([^']|\\')*'|"([^"]|\\")*"|[\S\s])*?)\s*(?[-\+]?)%}|(?{#[\S\s]*?#})|(?<(script)((?!<)[\s\S])*>((?!<\/script)[\s\S])*?{{[\s\S]*?<\/(script)>)|(?<(style)((?!<)[\s\S])*>((?!<\/style)[\s\S])*?{{[\s\S]*?<\/(style)>)|(?[\s\S]*))/;
+	/(?
(?\n)?(\s*?))(?{{\s*(?'([^']|\\')*'|"([^"]|\\")*"|[\S\s]*?)\s*}}|{%(?[-+]?)\s*(?(?for|endfor|if|else|endif|macro|endmacro|call|endcall|filter|endfilter|set|endset|include|import|from|extends|block|endblock)('([^']|\\')*'|"([^"]|\\")*"|[\S\s])*?)\s*(?[-+]?)%}|(?{#[\S\s]*?#})|(?<(script)((?!<)[\s\S])*>((?!<\/script)[\s\S])*?{{[\s\S]*?<\/(script)>)|(?<(style)((?!<)[\s\S])*>((?!<\/style)[\s\S])*?{{[\s\S]*?<\/(style)>)|(?[\s\S]*))/;
 
 export const parse: Parser["parse"] = (text) => {
 	const statementStack: Statement[] = [];