Skip to content

fix: nested anchor tags in toc#29191

Merged
kodster28 merged 1 commit intoproductionfrom
fix/toc-tags
Mar 20, 2026
Merged

fix: nested anchor tags in toc#29191
kodster28 merged 1 commit intoproductionfrom
fix/toc-tags

Conversation

@MohamedH1998
Copy link
Contributor

Summary

Problem
When a docs page has tags: in its frontmatter, the right-hand sidebar rendered an empty ghost pill bubble before each tag. For example, a page with tags: [Postgres, TypeScript, SQL] would render six elements instead of three — one empty, one with text, per tag.
This was introduced during the TOC redesign. When the tag link markup was updated, the new (with the revised Tailwind classes and data-tag-serp-link attribute) was inserted inside the existing rather than replacing it. The outer anchor had no text content, so it rendered as an empty pill. Nested tags are also invalid HTML.

Fix
Collapsed the two nested elements back into a single anchor, preserving the updated pill styles and the data-tag-serp-link analytics attribute.

Screenshots (optional)

Before
Screenshot 2026-03-20 at 20 03 59

After
Screenshot 2026-03-20 at 20 04 28

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@MohamedH1998 MohamedH1998 requested review from a team and kodster28 as code owners March 20, 2026 20:04
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
*.astro @cloudflare/content-engineering, @kodster28

@github-actions
Copy link
Contributor

@kodster28 kodster28 merged commit 5ab1d63 into production Mar 20, 2026
16 of 17 checks passed
@kodster28 kodster28 deleted the fix/toc-tags branch March 20, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants