astro icon indicating copy to clipboard operation
astro copied to clipboard

🐛 BUG: <style> in .md files makes compliation fail

Open NotWoods opened this issue 3 years ago • 1 comments

What version of astro are you using?

1.0.0-beta.52

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

None

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

Trying to use <style> inside markdown files makes rendering fail. The new markdown parser seems to fail when it encounters CSS, even though its within a style element.

This is working in version 1.0.0-beta.31 but breaks in later versions.

Link to Minimal Reproducible Example

https://codesandbox.io/s/epic-black-ecj5tr?file=/src/pages/styles.md

Participation

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

NotWoods avatar Jun 22 '22 20:06 NotWoods

Thanks for reporting @NotWoods! That is pretty confusing... we've been hard at work on fixing our markdown parser after some recent changes, and I know we haven't been checking for this use case. In the meantime, I'd suggest styling via an Astro layout using the :global() keyword to style headings, images, etc.

bholmesdev avatar Jun 23 '22 13:06 bholmesdev