Bard is parsing 'antlers' in code block #5558
Unanswered
harryjburk
asked this question in
Troubleshooting
Replies: 2 comments 4 replies
-
Wrap the code field in a 'noparse' tag when you use it in your template. Does that help? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, this is essentially a duplicate of this issue, but I haven't been able to solve it with what was mentioned there.
Basically, we are inserting code blocks in Bard which contain Twig/Timber snippets. This means they sometimes use the same markup as Antlers, such as
{{ function('gravity_form', 1) }}
. This causes the code block to render empty rather than with the string as I'd expect.According to the issue linked above, fields should use the parameter 'antlers: false' by default, but I can't find that parameter mentioned anywhere in the code (true or false). I tried adding it everywhere with anything to do with Bard, and no luck. Tried wrapping the code block in {{ noparse }}, tried adding '| noparse'... both also no luck, it just renders an empty code block rather than the string.
Any ideas? Am I a goose and missing something obvious?
Beta Was this translation helpful? Give feedback.
All reactions