fix regexp for templates_engine, dont be greedy

This commit is contained in:
norohind committed 2021-12-19 00:36:03 +03:00
1 parent 3d22b716bd
commit 163c5a4a87
1 file changed
+2 -2
+2 -2
View File
@@ -7,8 +7,8 @@ from os.path import join
import re
templates_dir = 'templates'
variable_pattern: re.Pattern = re.compile(r'\{\{ .* }}')
include_pattern: re.Pattern = re.compile(r'\{\{ @.* }}')
variable_pattern: re.Pattern = re.compile(r'{{ .*? }}')
include_pattern: re.Pattern = re.compile(r'{{ @.*? }}')
def render(template_name: str, context: dict):