0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages
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
..
astro Move to shiki and stabilize dual themes support (#10130) 2024-03-08 10:53:19 +00:00
astro-prism Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
astro-rss chore: use biome to sort imports - only test files (#10180) 2024-02-21 14:08:19 +00:00
create-astro [ci] release (#10362) 2024-03-07 19:53:37 -06:00
db [ci] release (#10362) 2024-03-07 19:53:37 -06:00
integrations fix(markdown): don’t generate mdast html nodes (#10104) 2024-03-08 10:53:39 +00:00
internal-helpers Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
markdown/remark fix(markdown): don’t generate mdast html nodes (#10104) 2024-03-08 10:53:39 +00:00
telemetry chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
underscore-redirects chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00
upgrade chore: import sort source code, exception for the astro package (#10242) 2024-02-27 11:15:27 +00:00