diff options
Diffstat (limited to 'packages/integrations/mdx/CHANGELOG.md')
-rw-r--r-- | packages/integrations/mdx/CHANGELOG.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index 483162a4e..a7cedf055 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,53 @@ # @astrojs/mdx +## 4.2.0 + +### Minor Changes + +- [#13352](https://github.com/withastro/astro/pull/13352) [`cb886dc`](https://github.com/withastro/astro/commit/cb886dcde6c28acca286a66be46228a4d4cc52e7) Thanks [@delucis](https://github.com/delucis)! - Adds support for a new `experimental.headingIdCompat` flag + + By default, Astro removes a trailing `-` from the end of IDs it generates for headings ending with + special characters. This differs from the behavior of common Markdown processors. + + You can now disable this behavior with a new configuration flag: + + ```js + // astro.config.mjs + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + experimental: { + headingIdCompat: true, + }, + }); + ``` + + This can be useful when heading IDs and anchor links need to behave consistently across your site + and other platforms such as GitHub and npm. + + If you are [using the `rehypeHeadingIds` plugin directly](https://docs.astro.build/en/guides/markdown-content/#heading-ids-and-plugins), you can also pass this new option: + + ```js + // astro.config.mjs + import { defineConfig } from 'astro/config'; + import { rehypeHeadingIds } from '@astrojs/markdown-remark'; + import { otherPluginThatReliesOnHeadingIDs } from 'some/plugin/source'; + + export default defineConfig({ + markdown: { + rehypePlugins: [ + [rehypeHeadingIds, { experimentalHeadingIdCompat: true }], + otherPluginThatReliesOnHeadingIDs, + ], + }, + }); + ``` + +### Patch Changes + +- Updated dependencies [[`cb886dc`](https://github.com/withastro/astro/commit/cb886dcde6c28acca286a66be46228a4d4cc52e7), [`a3327ff`](https://github.com/withastro/astro/commit/a3327ffbe6373228339824684eaa6f340a20a32e)]: + - @astrojs/markdown-remark@6.3.0 + ## 4.1.1 ### Patch Changes |