compiler icon indicating copy to clipboard operation
compiler copied to clipboard

🐛 BUG: Trouble parsing markdown file

Open GaussSeidelGuru opened this issue 3 years ago • 1 comments

What version of @astrojs/compiler are you using?

1.0.0-beta.63

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

image

[6:39: Failed to parse Markdown file "/home/projects/mklikxjow.github/src/pages/posts/index.md": Could not parse expression with acorn: Expecting Unicode escape sequence \uXXXX] {   reason: 'Could not parse expression with acorn: Expecting Unicode escape sequence \\uXXXX',

I'm not sure what about my markdown file is throwing off the compiler. I haven't noticed anything wrong on my end so I just wanted to submit this issue incase this is a bug on the compiler side.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-u3f66p?file=src/pages/posts/index.md

GaussSeidelGuru avatar Jul 06 '22 10:07 GaussSeidelGuru

@poutingemoji The problem in this instance, mate, is it seems you're trying to escape * when you're already inside the {}. You can retrieve the values as {frontmatter.value} /* 2 to print the value and equation, or you can do {frontmatter.value * 2} to print the result, but the actual math function will not function with an escaped operator \*.

ran-dall avatar Jul 23 '22 02:07 ran-dall

I'm going to close this as Astro Flavored Markdown has been deprecated to be officially removed in Astro 2.0.0. Check out our Markdown guide for the most up-to-date way to work with Markdown in Astro.

natemoo-re avatar Jan 13 '23 20:01 natemoo-re