npm / @astrojs/markdown-remark
@astrojs/markdown-remark
What changed in @astrojs/markdown-remark 6 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
15 breaking2 security5 deprecations4 new APIs and options2 performance5 behavior and defaults1 tooling7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@astrojs/markdown-remark 731 changes
Breaking changes 6
Code blocks for languages Prism doesn’t support, such as vue or svelte, are displayed as plain text instead of being rendered as HTML.
Dynamic values passed as <script> or <style> children are escaped instead of rendered raw; use set:html to opt back into raw rendering.
Astro no longer installs this package by default because Sätteri is now the default Markdown processor.
Markdown heading ID generation is updated, which may change the IDs generated for headings.
To keep using the unified pipeline, install
@astrojs/markdown-remarkand setmarkdown.processortounified().This deprecated option still works, but now requires
@astrojs/markdown-remarkto be installed.
Security 2
Astro: Reflected XSS via unescaped slot names in @astrojs/solid-js
Nested object and package metadata lookups now ignore prototype keys in content handling and project scaffolding.
Deprecations 5
The top-level option is deprecated; move plugins onto unified({...}) or your preferred plugin processor.
The top-level option is deprecated; move it onto unified({...}) or your preferred plugin processor.
The rehypePlugins option on the MDX integration is deprecated; move it onto unified({...}) or your preferred plugin processor.
The remarkPlugins option on the MDX integration is deprecated; move it onto unified({...}) or your preferred plugin processor.
The remarkRehype option on the MDX integration is deprecated; move it onto unified({...}) or your preferred plugin processor.
New APIs and options 4
Adds the recmaPlugins option for adding recma (estree/JSX) plugins to the MDX compiler.
Adds a configuration option for choosing an alternative Markdown processor; the default remains unified().
The smartypants property now accepts Smartypants options for fine-grained control over typography transformations.
Exposes the fileURL option so callers can specify the file URL used to resolve relative image paths.
Performance 2
Returns a cached highlighter based on Shiki options instead of always creating a new instance, improving performance for sites that heavily use Shiki and code.
Cached Shiki highlighter instances are reused across languages.
Behavior and default changes 4
Unpins @astrojs/* dependencies so versions matching the ^ range can be installed.
YAML parsing now supports timestamps and merge keys, and YAML errors are formatted consistently across Astro, Markdown, MDX, and Markdoc.
The processor now compiles .mdx files itself; projects still need to install @astrojs/mdx to add MDX support.
The processor now compiles .mdx files itself; projects still need to install @astrojs/mdx to add MDX support.
Tooling 1
The timing report now includes measurements for Markdown processing and syntax highlighting.
Fixes and other changes 7
Fixes heading text reporting
{as${when using theunified()processor, including ingetHeadings()andrender().headings.When ignoreElementNames is set, SVG attributes like marker-end are no longer converted to markerEnd.
MDX optimize no longer empties style and script elements nested in static HTML from plugins.
The code block language is correctly escaped in generated class and data-language attributes.
Fixes highlighting for code block languages ending in a symbol, such as c#, c++, and f#.
Fixes an unexpected error caused by using the Code component.
Fixes Prism-generated code blocks incorrectly including the is:raw attribute in the final output.
@astrojs/markdown-remark 610 changes
Breaking changes 9
HAST-only props are no longer directly converted into HTML attributes.
This CSS variable replaces --astro-code-color-background to align with Shiki v1 defaults.
This CSS variable is renamed to --astro-code-background to align with Shiki v1 defaults.
This CSS variable is renamed to --astro-code-foreground to align with Shiki v1 defaults.
This CSS variable replaces --astro-code-color-text to align with Shiki v1 defaults.
The return object exposes codeToHast and codeToHtml for generating either a HAST tree or an HTML string directly.
This API is removed in favour of isFrontmatterValid.
Astro heading metadata in Remark and Rehype plugins moves from vfile.data.__astroHeadings to vfile.data.astro.headings.
Astro image-path metadata moves from vfile.data.imagePaths to vfile.data.astro.imagePaths, and its type changes from Set<string> to string[].
Behavior and default changes 1
Frontmatter parsing is now handled by the package itself.