Skip to content

Fix Markdown cross-reference anchors for mapped models - #46

Merged
samchon merged 1 commit into
masterfrom
codex/fix-link-anchors
Nov 16, 2026
Merged

samchon merged 1 commit into
masterfrom
codex/fix-link-anchors

Conversation

@samchon

@samchon samchon commented Nov 16, 2026

Copy link
Copy Markdown
Owner

{@link User} currently links to #User even when @@map("users") renders a users heading. Resolve references through the complete model list and generate normalized anchors in document heading order, including duplicate-heading suffixes.

  • Apply the same resolution to model comments, field comments, summaries, cross-chapter references, and implicit M:N descriptions.
  • Preserve custom labels and legacy database-name references, with Prisma model names taking precedence over conflicting aliases.
  • Preserve the public writer signatures and their use as array callbacks.
  • Add a Prisma generation fixture with assertions that every emitted local fragment has a heading, plus 29 regression cases and CI coverage execution.
  • Regenerate examples and synchronize two schema comment typos with their existing corrected documentation so regeneration preserves those corrections.

Validation: npm run build, npm test (root schema and four fixtures), npm run vitest:cov (31 tests passed), Prettier, Prisma formatting, and git diff --check all pass locally on Node.js 24.18.0 / Prisma 7.0.0.

Closes #45.

@samchon samchon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review of commit 725aaf6 completed. No outstanding actionable findings in the final PR diff.

  • Reviewed all 15 changed files, including generated Markdown and CI execution of the new tests.
  • Checked Prisma-name/database-name precedence, custom labels, field references, cross-chapter resolution, summary-only comments, and implicit M:N links.
  • Checked document-title/chapter/model anchor collisions, repeated models, existing numeric suffixes, punctuation, and Unicode table names.
  • Confirmed the public API signatures are unchanged and standalone writers remain usable as array callbacks.
  • Validation passed: build, Prisma generation for the root schema plus four fixtures, all 31 unit tests, formatting, and whitespace checks. The new CLI fixture also asserts that every emitted local link has a corresponding heading.

@samchon
samchon merged commit 50ee3c0 into master Nov 16, 2026
3 checks passed
@samchon
samchon deleted the codex/fix-link-anchors branch November 16, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{@link} anchors ignore @@map names and keep uppercase letters

1 participant