lambda-packages
lambda-packages copied to clipboard
🐛 BUG: Scripts inside script tags inside markdown crash dev and build
What version of astro are you using?
v1.0.0-beta.44
Are you using an SSR adapter? If so, which one?
no
What package manager are you using?
npm, pnpm
What operating system are you using?
Linux
Describe the Bug
Creating a markdown file with a <script> that has some script inside will error the md parser
- Create a markdown file with
<script type="text/javascript">
function test() {return}
</script>
- Import said file into
index.astro - Run
devorbuild
error Failed to parse Markdown file "/home/projects/github-2zg3f6/src/pages/test.md":
Unexpected end of file in expression, expected a corresponding closing brace for `{`
11:37:05 PM [astro] reload /src/pages/test.md
[2:19: Failed to parse Markdown file "/home/projects/github-2zg3f6/src/pages/test.md":
Unexpected end of file in expression, expected a corresponding closing brace for `{`] {
reason: 'Unexpected end of file in expression, expected a corresponding closing brace for `{`',
line: 2,
column: 19,
source: 'micromark-extension-mdx-expression',
ruleId: 'unexpected-eof',
position: {
start: { line: 2, column: 19, offset: 51, _index: 1, _bufferIndex: -1 },
end: { line: null, column: null }
}
}
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-2zg3f6?file=src/pages/test.md
Participation
- [ ] I am willing to submit a pull request for this issue.