Tracking the non-blocking items surfaced while reviewing PR #430 (slug-based heading anchor IDs). None of these block that PR — capturing them here so we can handle them ourselves rather than asking the contributor to expand the scope of a focused fix.
Test coverage gaps
Code clarity
Structural / product decisions
Documentation
Related to #430, #429.
Tracking the non-blocking items surfaced while reviewing PR #430 (slug-based heading anchor IDs). None of these block that PR — capturing them here so we can handle them ourselves rather than asking the contributor to expand the scope of a focused fix.
Test coverage gaps
"section"fallback — no test exercises the branch whereslugify()produces nothing (e.g. a punctuation-only## !!!or dash-only## ---heading).## 你好) — distinct from the mixedIntroduccióncase; exercises the id as a raw UTF-8 byte sequence.## Foo --- Bar→foo-bar,## Foo→foo) — each is its own code path with no current coverage.## Version 2_0→version-2_0).id="qampa"is absent, not justid="qa"present).testDuplicateHeadingsCollapseToSameId: addXCTAssertGreaterThan(secondC, firstC)for rigor.Code clarity
header_count++inhoedown_patch_render_toc_header— the value is no longer read now that the TOC href is slug-based.'/ numeric character references are skipped (dropped), not decoded, to prevent a future "fix" that decodes them.>= 0x80well-formed-UTF-8 passthrough assumption and the trailing-hyphen-trim loop.hoedown_patch_render_headercomment: "independent of the TOC nesting level" → "independent of the Detect TOC token preference".Structural / product decisions
slugify()/render_headerlogic shared byte-for-byte betweenMacDown/Code/Extension/hoedown_html_patch.c(MacDown target) andMacDownCore/MPQuickLookRenderer.m(MacDownCore target) — the two copies will drift if either is changed alone. Likely needs a shared C unit reachable from both targets.-1/-2suffixes). Current behavior collapses identical headings to the same id (only the first is reachable by anchor); documented as intentional in a test. Common patterns like repeated## APIsections would be affected.Documentation
plans/test_coverage_improvement_plan.md:128— stale rationale ("prevents unwanted header ID generation when table of contents is disabled"); heading IDs are now unconditional.MacDown/Resources/help.md— document the new[link](#slug)anchor-navigation capability.plans/quick-look-manual-testing.md— add a checklist item verifying headingidattributes / anchor navigation in Quick Look.Related to #430, #429.