templates: Add {{#let}} block helper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-04-05 13:05:31 -07:00
committed by Tim Abbott
parent e83538167f
commit f81cc16a0f
5 changed files with 46 additions and 0 deletions

View File

@@ -133,6 +133,8 @@ def tokenize(text: str) -> List[Token]:
elif looking_at_handlebars_start():
s = get_handlebars_tag(text, state.i)
tag = s[3:-2].split()[0]
if tag.startswith("*"):
tag = tag[1:]
kind = "handlebars_start"
elif looking_at_handlebars_end():
s = get_handlebars_tag(text, state.i)