question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot ignore curly braces in front matter string

See original GitHub issue
---
title: "Join <raw>{{admin_name}}</raw>"
preheader: "Join @{{admin_name}} "
---

Expected behavior: The curly braces should be ignored. What happens: When the template is built the template replaces this variable with “undefined”

The above options do not work - this is inconsistent with what’s expected as a syntax in the template.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
viperfxcommented, Mar 5, 2021

Okay that works! Yes - I needed to escape on the layout too, But works with a single @ applied to both places.

0reactions
cossssmincommented, Aug 19, 2021

@cossssmin ive come across another issue where I cannot escape variables that are include via a component

Just tested and it works fine, can you provide an example where it fails?

Also postmark uses three curly braces for allowing dynamic content such as HTML. Is there a way we can escape so it

You can theoretically escape {{{ content }}} with @{{{ content }}}, but it looks like it’s not working as expected in posthtml-expressions. Got it working with {@{{ content }}} (I know it’s weird but it’ll have to do until we get it fixed). <raw>{{{ content }}}</raw> should also work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it true that I can't use curly braces in Python? - Stack Overflow
I was reading that Python does all it's "code blocks" by indentation, rather than with curly braces. Is that right?
Read more >
How to escape curly braces within \texttt{} - TeX
another technique that works is \textt{\char \{} (with a backtick between \char and the \{ , which can't easily be shown here in...
Read more >
Double curly brace {{ }} conflict override - feature - HUGO
Even the ability to turn off template binding via the Front Matter would be a nice feature, I would just disable it for...
Read more >
Template Designer Documentation - Jinja
It's important to know that the outer double-curly braces are not part of the variable, but the print statement. If you access variables...
Read more >
GitLab Flavored Markdown (GLFM)
In GitLab, front matter is used only in Markdown files and wiki pages, not the other ... The wrapping tags can be either...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found