Repository navigation
fix(check-docs): ignore link-shaped text in inline code spans without hiding real links - #216
Merged
Merged
Conversation
… hiding real links A generic Go call in inline code, such as `errors.AsType[T](err)`, matched the link pattern and failed the gate as a broken link (core#201). The gate now skips a link-shaped match only when its whole original range is inside a code span of a safe run of non-blank lines. A run with a `|`, an escaped backtick, a `<` with a later `>`, or a line with an unpaired backtick run keeps every link checked. Spans are computed on the original text, never on fence-stripped text. Fence and comment stripping are unchanged. The guard tests cover each case the core#200 review found, plus 2 cases from the fence mapping. The 3 split calls in the vendored Go skills stay until the updex and std docs gates read code spans too.
bketelsen
approved these changes
Nov 6, 2026
5 tasks done
bketelsen
pushed a commit
that referenced
this pull request
Nov 6, 2026
The docs gates of core, updex and std now ignore link-shaped text inside an inline code span (#216, frostyard/updex#493, frostyard/std#99), so the vendored Go skills no longer need the split `X[T]`(`v`) form. Restore upstream's single code span in golang-error-handling, golang-safety and golang-modernize/references/versions.md, drop the 3 marked override comments, and drop the Code spans entry from the overrides list. Closes #201. Co-authored-by: frostyard-machines <[email protected]>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check-docs.mjsread link-shaped text inside inline code as a link. A Go generic call in a code span, such aserrors.AsType[T](err), failed the gate as a broken link (#201).The gate now skips a link-shaped match only when CommonMark would render it as code. The rule is conservative: a real link is never hidden.
|(GFM table cells), a backslash before a backtick (escaped backtick), a<with a later>(raw HTML and autolinks bind before code spans), a line with an unpaired backtick run (wrapped spans, adjacent headings, run-length mismatch), or a marker outside every span with a later backtick:](or][(a link destination, title or reference label consumes the backtick),www.or://(a GFM extended autolink path does too), or$(GitHub inline math). In a safe run, each line pairs runs of equal length left to right, which is CommonMark's own pairing.docs/README.mdno longer indexes a doc (stricter only).Guard tests in
test/docs-integrity.test.mjscover every case the #200 review found against the earlier stripper (escaped backticks, run lengths, adjacent headings, wrapped spans, GFM tables, raw HTML, email autolinks), a code span in link text, 2 fence-mapping cases (a chunk removed mid-line, a list-item fence), backticks consumed by a link destination, title, reference label, GFM autolink or inline math, a U+00A0 line, a lone CR, index coverage, and 6 passing cases (generic calls, a run-length span,Go <1.26with a span, CRLF,://inside a span)..memory/corrections.jsonlgets 1docs-gateline.The 3 split generic calls in the vendored Go skills stay for now. The docs gates of updex and std check every Markdown file, synced skills included, and do not read code spans yet. If core removed the overrides first, the skills-sync PRs to those repositories would fail.
docs/design/shared-skills.mdnow says this. A later PR removes the overrides once those gates read code spans.Refs #201 (it stays open for the override removal).
Risk tier
Risk tier: 2 — a change to a quality gate (
scripts/check-docs.mjs) and its tests. No path in.github/risk-paths.jsonmatches. No workflow or skills-sync change.Docs housekeeping
docs/design/shared-skills.mdedited in place; no new doc)Verification
node scripts/check-docs.mjsgreen:checked: 101 docs, 1912 links, 10 symlinks(same counts as before)make verify: 414 tests pass; CI green at f21f24bnode --test test/docs-integrity.test.mjswith onlyscripts/check-docs.mjsreplaced:<without>, CRLF pairing,://inside a span). The must-fail cases pass there, because the base gate checks every match.www.autolink,https://autolink, inline math).Cross-review
Reviewer: openai/gpt-6.1-sol. Coder: github-copilot/mai-code-2-flash.