Skip to content

Conversation

florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Oct 6, 2025

@florian-lefebvre florian-lefebvre added this to the v6.0.0 milestone Oct 6, 2025
@florian-lefebvre florian-lefebvre self-assigned this Oct 6, 2025
Copy link

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: abfd07f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) docs pr semver: major Change triggers a `major` release labels Oct 6, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a major changeset. A reviewer will merge this at the next release if approved.

@florian-lefebvre florian-lefebvre marked this pull request as ready for review October 6, 2025 09:17
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for tackling @florian-lefebvre 💖

Left a couple of queries and requesting changes so we don’t forget to resolve the changeset TODO.

Comment on lines -20 to +19
let slug = headingSlugger.slug(textContent);

if (!experimentalHeadingIdCompat) {
if (slug.endsWith('-')) slug = slug.slice(0, -1);
}
return slug;
return headingSlugger.slug(textContent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that I’m not familiar enough with the Markdoc integration to know if there’s a good way for users to modify our logic if they want backwards compatibility.

We have docs on using a custom heading component, but not on how to generate your own id.

Maybe they have to write their own transform() for headings? We’d need to test.

If it’s super onerous, does anyone think we should offer a backwards compat option for the Markdoc integration? Or do we just embrace that it’s a breaking change and people need to update their links. Markdoc usage is fairly low and the cases where this is breaking will be relatively infrequent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah given how low it is, I don't think it's worth investing a lof of effort in it

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good once we update the changeset!

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted one detail but them LGTM!

@florian-lefebvre florian-lefebvre merged commit 727b0a2 into next Oct 16, 2025
6 checks passed
@florian-lefebvre florian-lefebvre deleted the feat/stabilize-heading-id-compat branch October 16, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) semver: major Change triggers a `major` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants