Skip to content

Commit c293646

Browse files
committed
fix: reference crossfilereferenceintegrity helpers by name, not line
Line numbers drift as the file evolves. Replace 'around lines 349 and 389' with a reference to the collectHeadingAnchors / slugify helpers.
1 parent e5f95ea commit c293646

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

plan/89_toc-generator-directive.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ heading anchor mdsmith already computes for
9090
cross-file heading references.
9191

9292
Do not define a TOC-specific slug algorithm.
93-
Reuse the `slugify` function and
93+
Reuse the `slugify` function and the
9494
duplicate-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

Comments
 (0)