Skip to content

Make documentation index checks line-ending agnostic #78

Description

Contributors run the documentation index checker locally to verify generated navigation tables before opening a pull request.

Request

On a Windows checkout with core.autocrlf=true, pwsh .github/scripts/Update-DocumentationIndex.ps1 -Check reports every generated index as stale even when the committed LF content is current and the same revision passes CI. The renderer inserts LF table lines into text read with CRLF endings, so byte-for-byte comparison produces false drift. The check and update modes should behave consistently on LF and CRLF checkouts without rewriting unchanged content.

Acceptance criteria

  • Current indexes pass -Check from both LF and CRLF working copies
  • Real table-content drift still fails -Check
  • Update mode produces internally consistent line endings and does not report unchanged indexes as modified
  • Existing index, link, lint, and clean Zensical build checks remain green

Technical decisions

Comparison: Treat line-ending style as representation rather than generated-table content. Compare equivalent normalized text or render with the existing file's detected newline sequence.

Writing: Preserve one consistent newline style per index file when an actual update is required; do not create mixed-line-ending files.

Regression coverage: Exercise both LF and CRLF index inputs so Windows behavior remains protected.


Implementation plan

Line-ending behavior

  • Add regression coverage for current LF and CRLF indexes
  • Update .github/scripts/Update-DocumentationIndex.ps1 to compare and render line endings consistently

Validation

  • Verify unchanged and intentionally stale indexes in both line-ending styles
  • Run repository documentation checks and CI

Metadata

Metadata

Labels

NoReleaseNo release required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions