Skip to content

[2.x] Strip Markdown from sidebar table of contents - #2607

Merged
emmadesilva merged 2 commits into
2.xfrom
v2/strip-markdown-sidebar-toc
Sep 4, 2026
Merged

[2.x] Strip Markdown from sidebar table of contents#2607
emmadesilva merged 2 commits into
2.xfrom
v2/strip-markdown-sidebar-toc

Conversation

@emmadesilva

Copy link
Copy Markdown
Member

Fixes #2591.

Summary

  • convert Markdown heading titles to plain text before displaying them in the sidebar table of contents
  • preserve the existing heading identifier used by the table of contents
  • add a regression test using the linked-heading example from the issue

Testing

  • php vendor/bin/phpunit packages/framework/tests/Unit/GeneratesSidebarTableOfContentsTest.php
  • php vendor/bin/phpunit packages/framework/tests/Feature/Views/SidebarTableOfContentsViewTest.php
  • php vendor/bin/phpstan analyse packages/framework/src/Framework/Actions/GeneratesTableOfContents.php packages/framework/tests/Unit/GeneratesSidebarTableOfContentsTest.php --no-progress
  • git diff --check

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4211c85) to head (c02700d).
⚠️ Report is 4 commits behind head on 2.x.

Additional details and impacted files
@@             Coverage Diff             @@
##                 2.x     #2607   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      1628      1628           
===========================================
  Files            169       169           
  Lines           4097      4097           
===========================================
  Hits            4097      4097           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@emmadesilva
emmadesilva merged commit 012c127 into 2.x Sep 4, 2026
20 checks passed
@emmadesilva
emmadesilva deleted the v2/strip-markdown-sidebar-toc branch September 4, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Markdown should be stripped from sidebar table of contents

1 participant