0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
astro/packages/integrations
Remco Haszing a31bbd7ff8
fix(markdown): don’t generate mdast html nodes (#10104)
* fix(markdown): don’t generate mdast html nodes

`html` nodes from mdast are converted to `raw` hast nodes. These nodes
are then not processed by proper rehype plugins. Typically if a remark
plugin generates `html` nodes, this indicates it should have actually
been a rehype plugin.

This changes the remark plugins that generate `html` nodes into rehype
nodes. These were `remarkPrism` and `remarkShiki`.

Closes #9909

* Apply suggestions from code review

* refactor(mdx): move user defined rehype plugins after syntax highlighting

* fix(mdx): fix issue in mdx rehype plugin ordering

* docs: explain why html/raw nodes are avoided in changeset

This also includes some hints on what users could do to upgrade of they
rely on these nodes.

* Fix MDX rehype plugin ordering

* refactor(remark): restore remarkPrism and remarkShiki

They aren’t used anymore, but removing would be a breaking change.

* chore: mark deprecated

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/thirty-beds-smoke.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 10:53:39 +00:00
..
alpinejs Update Vite to latest (#10259) 2024-02-28 23:20:17 +08:00
cloudflare chore(cloudflare): remove adapter (#8758) 2023-10-16 17:42:12 +02:00
deno fix(deno): link to adapter repo (#8712) 2023-10-02 16:33:24 +02:00
lit chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
markdoc [ci] release (#10292) 2024-03-02 00:42:07 -08:00
mdx fix(markdown): don’t generate mdast html nodes (#10104) 2024-03-08 10:53:39 +00:00
netlify chore(cloudflare): remove adapter (#8758) 2023-10-16 17:42:12 +02:00
node [ci] release (#10286) 2024-03-01 12:10:51 +00:00
partytown chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
preact chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
react Update Vite to latest (#10259) 2024-02-28 23:20:17 +08:00
sitemap chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
solid chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
svelte Update Vite to latest (#10259) 2024-02-28 23:20:17 +08:00
tailwind Update Vite to latest (#10259) 2024-02-28 23:20:17 +08:00
vercel [ci] release (#10337) 2024-03-05 16:58:48 -08:00
vue [ci] format 2024-03-05 15:22:07 +00:00