I'm running into a situation where fasttemplate treats any }} inside an expression as the end of that expression, even when the braces are meant to be literal content.
For example:
The inner }} is part of the string I want to output, but fasttemplate closes the expression early, which causes an error.
I tried escaping the braces in different ways, but nothing works because tokenizer-level parsing always stops at the first }}.
can also breaks cases like:
${{ {"foo": {"bar": "baz"}} }}
its because the }} inside the JSON object closes the expression too soon.
I just wanted to check :
- is there an existing workaround for emitting literal
}} inside an expression you might be aware of?
- can we support an alternative pair of start/end delimiters (for example
$~~ ... ~~) so users can avoid conflicts when their expressions contain literal braces?
- or is there a recommended pattern for escaping braces that I might be missing?
thanks a lot for the awesome library!
I'm running into a situation where fasttemplate treats any
}}inside an expression as the end of that expression, even when the braces are meant to be literal content.For example:
The inner
}}is part of the string I want to output, but fasttemplate closes the expression early, which causes an error.I tried escaping the braces in different ways, but nothing works because tokenizer-level parsing always stops at the first
}}.can also breaks cases like:
its because the
}}inside the JSON object closes the expression too soon.I just wanted to check :
}}inside an expression you might be aware of?$~~ ... ~~) so users can avoid conflicts when their expressions contain literal braces?thanks a lot for the awesome library!