-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remark-caption's code block captions are not working #7156
Comments
This seems to be a bug in {
"type": "figure",
"lang": "js",
"meta": null,
"value": "const hello = 'world'",
"position": {
"start": {
"line": 13,
"column": 1,
"offset": 228
},
"end": {
"line": 15,
"column": 4,
"offset": 259
}
},
"children": [
{
"type": "html",
"lang": "js",
"meta": null,
"value": "<pre is:raw class=\"astro-code github-dark\" style=\"background-color: #24292e; overflow-x: auto;\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">const</span><span style=\"color: #E1E4E8\"> </span><span style=\"color: #79B8FF\">hello</span><span style=\"color: #E1E4E8\"> </span><span style=\"color: #F97583\">=</span><span style=\"color: #E1E4E8\"> </span><span style=\"color: #9ECBFF\">'world'</span></span></code></pre>",
"position": {
"start": {
"line": 13,
"column": 1,
"offset": 228
},
"end": {
"line": 15,
"column": 4,
"offset": 259
}
},
"children": []
},
{
"type": "figcaption",
"children": [
{
"type": "text",
"value": "this is a sample code"
}
],
"data": {
"hName": "figcaption"
}
}
],
"data": {
"hName": "figure"
}
} And here's the converted hast: {
"type": "element",
"tagName": "figure",
"properties": {},
"children": []
} The reason it gets removed for the code block, but not the table, is because of how A quick way to fix this is to write a custom remark plugin to patch this to remove the Overall I think Astro is doing the right thing here, so closing as expected behaviour. |
What version of
astro
are you using?2.4.1
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm/pnpm
What operating system are you using?
Linux
What browser are you using?
Chrome
Describe the Bug
Upgrading from astro v1 to v2, I've noticed that my markdown code blocks are no longer rendered.
For example, a markdown code snippet such as this:
Does not render anything but an empty
<figure>
tag.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ocigyn?file=src%2Fpages%2Ftest.md
Participation
The text was updated successfully, but these errors were encountered: