mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-04-12 04:40:02 +03:00
templates_engine: regexp, don't be greedy
This commit is contained in:
parent
84bfa8c861
commit
203d859eec
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user