inja icon indicating copy to clipboard operation
inja copied to clipboard

Using curly braces inside template without spaces

Open Babilinski opened this issue 2 years ago • 1 comments

I'm parsing values into markdown format and having an issue when including a curly brace "{" inside of the template. For example the following line fails to parse: {#{{child.kind}}-{{child.name}}}

Exception at Renderer.cpp:303 Failed to load template: 'kind_file' error: Exception at Renderer.cpp:303 Failed to load template: 'nonclass_members_details' error: [inja.exception.parser_error] (at 15:183) unexpected '}

Is there a workaround for this?

Babilinski avatar Oct 20 '21 15:10 Babilinski

The only solution I have found is to use Environment::set_comment to change the comment tokens to e.g. {## and ##}.

Reen avatar Aug 30 '22 14:08 Reen