Promptify
Promptify copied to clipboard
Template parser can't handle escape characters or mixed quotes in the template definition
Both of these example templates result in the error TemplateSyntaxError: unexpected char '\\' at 5
:
ner.jinja:
{{ ' "hello world" ' }}
ner.jinja:
{{ " \"\"\"hello world\"\"\" " }}
And I confirmed it's not an issue with jinja
, because passing the same template directly to jinja
works fine:
>>> jinja2.Template('{{ \' "hello world" \' }}').render()
' "hello world" '
>>> jinja2.Template('{{ " \\"\\"\\"hello world\\"\\"\\" " }}\n').render()
' """hello world""" '
Hi Can i take this issue @monk1337
@syedjafer Sure, Plan is to build a verifier. Please check #8 and #4. Feel free to open a PR. If you want to discuss the details, Please ping me on discord.
@syedjafer Are you taking the issue?
@monk1337 yes mate. but i can take this only on weekends.