lambda-packages icon indicating copy to clipboard operation
lambda-packages copied to clipboard

🐛 BUG: Frontmatter variables inside markdown don't work on specific cases

Open felixsanz opened this issue 3 years ago • 1 comments

What version of astro are you using?

v1.0.0-beta.42

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

A markdown file with variables inside frontmatter, sometimes those variables don't work. On text they do fine, but at least on anchors they don't.

this is text showing variable {frontmatter.url}.

this is text having a [link to contact page]({frontmatter.url}/contact)

This piece of markdown renders:

<p>this is text showing variable http://localhost.</p>
<p>this is text having a <a href="%7Bfrontmatter.url%7D/contact">link to contact page</a></p>

Link to Minimal Reproducible Example

https://codesandbox.io/s/festive-haze-ssjf38?file=/src/test.md

Participation

  • [ ] I am willing to submit a pull request for this issue.

felixsanz avatar Jun 17 '22 01:06 felixsanz

Thanks for filing this @felixsanz! I'd expect that to work as well, looks like we probably need to prevent the {} from being escaped 🤔

tony-sull avatar Jun 20 '22 15:06 tony-sull