@@ -90,17 +90,17 @@ heading anchor mdsmith already computes for
9090cross-file heading references.
9191
9292Do not define a TOC-specific slug algorithm.
93- Reuse the ` slugify ` function and
93+ Reuse the ` slugify ` function and the
9494duplicate-disambiguation logic currently in
9595[ ` internal/rules/crossfilereferenceintegrity/rule.go ` ] [ cfri ]
96- (around lines 349 and 389 ). Move that helper
97- into a shared package — ` internal/mdtext/ ` is
98- the natural home — and have both rules call
99- the shared code so anchors stay consistent
100- across rules. Repeated headings must receive
101- the same ` -1 ` , ` -2 ` , … suffixes in source
102- order as the existing reference-integrity
103- rule.
96+ (used by ` collectHeadingAnchors ` ). Move that
97+ helper into a shared package —
98+ ` internal/mdtext/ ` is the natural home — and
99+ have both rules call the shared code so
100+ anchors stay consistent across rules. Repeated
101+ headings must receive the same ` -1 ` , ` -2 ` , …
102+ suffixes in source order as the existing
103+ reference-integrity rule.
104104
105105[ cfri ] : ../internal/rules/crossfilereferenceintegrity/rule.go
106106
0 commit comments