File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,17 +90,15 @@ 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
94- duplicate-disambiguation logic currently in
93+ Reuse the ` slugify ` function and the
94+ duplicate-disambiguation logic 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 it
97+ into a shared package. ` internal/mdtext/ ` is
98+ the natural home. Both rules then call shared
99+ code so anchors stay consistent. Repeated
100+ headings get ` -1 ` , ` -2 ` , … suffixes in source
101+ order, matching the reference-integrity rule.
104102
105103[ cfri ] : ../internal/rules/crossfilereferenceintegrity/rule.go
106104
You can’t perform that action at this time.
0 commit comments