Skip to content

Keep keyword-argument literals unlinked - #158

Closed
tony wants to merge 1 commit into
mainfrom
ruby-keyword-literals
Closed

tony wants to merge 1 commit into
mainfrom
ruby-keyword-literals

Conversation

@tony

@tony tony commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Prose code literals link every name that resolves to exactly one member. A keyword argument names a parameter of the call being described, so the Ruby Server reference linked cancel: to Cancellation#cancel, clients: true to Snapshot#clients, where: to Selection#where, and action: to an unrelated Workspace ApplyResult member.

A literal shaped like a keyword argument (name: or name: value) now stays plain in HTML and in Markdown exports. A bare name such as cancel still links. Selectors like name(_:) and paths like std::string don't match the pattern.

Tests: site/test/inline-reference-appearance.test.ts checks Ruby HTML and TypeScript Markdown; it fails without the rule. The site suite (4,599 passed) and the api-model suite (942) pass.

why: Prose code literals link every name that resolves to one member.
A keyword argument names a parameter of the call being described, so
Ruby's `cancel:` linked to Cancellation#cancel, `clients: true` to
Snapshot#clients, and `action:` to an unrelated Workspace member.

what:
- Add SymbolIndex.linkLiteral, which leaves `name:` and `name: value`
  plain and links other literals as before
- Use it for HTML prose, and skip keyword arguments in Markdown export
- Test that keyword arguments stay plain while the bare name still links
@tony

tony commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #157, which now carries every fix from the 2026-10-18 review on one branch so they share one CI run, preview and deploy. This commit is on that branch unchanged. Discussion and evidence stay here.

@tony tony closed this Oct 18, 2026
@tony
tony deployed to docs-preview-cleanup October 18, 2026 11:27 — with GitHub Actions Active

This branch was successfully deployed

2 active deployments
docs-preview-cleanup — abb6491b Deployed Oct 18, 2026 by tony via cleanup #142
docs-preview — abb6491b Deployed Oct 18, 2026 by tony via publish-preview / publish #814
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.

1 participant