@astrojs/markdoc@2.0.5
withastro/astro@astrojs/markdoc@2.0.5Jul 27, 2026by astrobot-houston
AI Summary
This update ensures that custom transform functions are preserved during rendering, specifically addressing cases where they were being dropped in favor of custom render components or complex tag syntaxes.
Key Highlights
- Preserves custom transform functions even when a custom `render` component is specified for a tag.
- Fixes transform dropping for tags using bracket notation (e.g., `side-note`).
- Supports transform preservation for tags using optional chaining and whitespace.
Full Release Notes
### Patch Changes - [#17460](https://github.com/withastro/astro/pull/17460) [`3b93a1a`](https://github.com/withastro/astro/commit/3b93a1a1cce669b71729d2b946fa2d41dae79ad6) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Fixes custom `transform` functions being dropped when a tag or node also specifies a custom `render` component. User-written transforms are now always preserved; only Markdoc's built-in transforms are removed so the custom component wins. - [#17191](https://github.com/withastro/astro/pull/17191) [`fc3fb2b`](https://github.com/withastro/astro/commit/fc3fb2bcfdd3223a6a9acfcb3b09efaa9d4a28e8) Thanks [@eldardada](https://github.com/eldardada)! - Fixes custom `transform` functions being incorrectly dropped for tags and nodes whose names require bracket access (e.g. `side-note`). The check that detects whether a transform respects a custom `render` component now recognizes bracket notation, optional chaining and whitespace, not only dot notation.