Skip to content

Commit 0ac087f

Browse files
Apply suggestions from code review
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent 29797d7 commit 0ac087f

File tree

1 file changed

+3
-3
lines changed
  • src/content/docs/en/guides/upgrade-to

1 file changed

+3
-3
lines changed

src/content/docs/en/guides/upgrade-to/v6.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,9 @@ If you need more control over environment variables in Astro, we recommend you u
592592

593593
In Astro 5.5, the `experimental.headingIdCompat` flag was introduced to make the IDs generated by Astro for Markdown headings compatible with common platforms like GitHub and npm, using the popular [`github-slugger`](https://github.com/Flet/github-slugger) package.
594594

595-
In Astro 5.x, Astro had an additional default processing step that stripped a trailing hyphen from the end of IDs for headings ending in special characters.
595+
In Astro 5.x, Astro had an additional default processing step that stripped trailing hyphens from the end of IDs for headings ending in special characters.
596596

597-
Astro 6.0 removes this experimental flag and makes this the new default behavior in Astro: trailing hyphen from the end of IDs for headings ending in special characters isn't stripped anymore.
597+
Astro 6.0 removes this experimental flag and makes this the new default behavior in Astro: trailing hyphens from the end of IDs for headings ending in special characters aren't stripped anymore.
598598

599599
#### What should I do?
600600

@@ -676,7 +676,7 @@ will generate the following HTML:
676676
visit(tree, 'element', (node) => {
677677
if (headingRank(node) && !node.properties.id) {
678678
let slug = slugs.slug(toString(node));
679-
// Strip trailing hyphen like in Astro v5 and below:
679+
// Strip trailing hyphens like in Astro v5 and below:
680680
if (slug.endsWith('-')) slug = slug.slice(0, -1);
681681
node.properties.id = slug;
682682
}

0 commit comments

Comments
 (0)