Skip to content

Fix Markdown comment syntax in docs source files#11010

Open
nduaarte wants to merge 1 commit into
TanStack:mainfrom
nduaarte:fix/markdown-comment-syntax
Open

Fix Markdown comment syntax in docs source files#11010
nduaarte wants to merge 1 commit into
TanStack:mainfrom
nduaarte:fix/markdown-comment-syntax

Conversation

@nduaarte

@nduaarte nduaarte commented Jun 30, 2026

Copy link
Copy Markdown

🎯 Changes

Fixes visible [//]: # 'Example' markers appearing literally in the
rendered documentation (e.g. on the Queries guide page).

The intended Markdown "hidden comment" syntax requires parentheses, not
quotes:

[//]: # (comment)

The docs were using single quotes instead:

[//]: # 'comment'

This is not recognized as a hidden link-reference by Markdown parsers, so
the marker renders visibly on the page instead of being hidden.

Root cause: most framework-specific docs (Vue, Angular, Solid, Svelte)
are generated from the react/ source files via scripts/generate-docs.ts.
The malformed syntax originated in the react/ source and was propagated
to every generated file.

Fix: updated the syntax only in the 38 source files that do not have a
ref: frontmatter field (i.e. the files that are not auto-generated).
Running pnpm generate-docs will propagate this fix to the remaining
generated files automatically.

Confirmed no project code references the old pattern:

grep -r "\[//\]: #" --include="*.js" --include="*.ts" --include="*.mjs" .

(no matches found)

Note: was unable to run pnpm run test:pr locally due to unstable network
conditions while installing dependencies. Verified the change manually via
sed dry-runs and git diff --stat (38 files changed, 1:1 line
replacement, no unintended additions/removals).

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Standardized documentation markers and section boundaries across many framework guides for more consistent rendering.
    • Added or expanded guidance in a few guides, including mutations, prefetching, query retries, and parallel queries.
    • Clarified several best practices and behaviors around mutation handling, background retries, optimistic updates, and query prefetching.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR standardizes Markdown comment marker syntax used for snippet referencing across docs/framework and docs/reference, switching from a single-quoted form (e.g., [//]: # 'Example') to a parenthesized form (e.g., [//]: # (Example)). Several files also add new explanatory content (mutations, retries, mutation responses, prefetching, parallel queries) alongside the marker changes.

Changes

Documentation marker syntax and content updates

Layer / File(s) Summary
Mutations, retries, and mutation-response guidance
docs/framework/react/guides/mutations.md, docs/framework/react/guides/query-retries.md, docs/framework/react/guides/updates-from-mutation-responses.md
New subsections added (Resetting Mutation State, Mutation Side Effects, Consecutive mutations, Promises, Retry, Persist/Persisting Offline mutations, Mutation Scopes, Background Retry Behavior, Immutability) plus marker reformatting.
Prefetching, parallel queries, disabling queries
docs/framework/react/guides/prefetching.md, docs/framework/react/guides/parallel-queries.md, docs/framework/react/guides/disabling-queries.md
New "Manually Priming a Query" section, TypeScript/suspense info callouts, and Example2 marker repositioning, plus marker reformatting.
Angular docs markers
docs/framework/angular/guides/query-cancellation.md, docs/framework/angular/overview.md, docs/framework/angular/quick-start.md
Marker syntax standardized.
React guides markers (A–M)
docs/framework/react/graphql.md, .../advanced-ssr.md, .../background-fetching-indicators.md, .../default-query-function.md, .../dependent-queries.md, .../important-defaults.md, .../infinite-queries.md, .../initial-query-data.md, .../invalidations-from-mutations.md, .../migrating-to-v5.md
Marker syntax standardized.
React guides markers (O–W)
docs/framework/react/guides/optimistic-updates.md, .../paginated-queries.md, .../placeholder-query-data.md, .../polling.md, .../queries.md, .../query-cancellation.md, .../query-functions.md, .../query-invalidation.md, .../query-keys.md, .../query-options.md, .../request-waterfalls.md, .../window-focus-refetching.md
Marker syntax standardized.
React overview/installation/reference/typescript
docs/framework/react/installation.md, .../overview.md, .../quick-start.md, .../reference/hydration.md, .../reference/queryOptions.md, .../typescript.md
Marker syntax standardized.
Solid, Vue, reference docs
docs/framework/solid/typescript.md, docs/framework/vue/guides/prefetching.md, docs/reference/QueryCache.md
Marker syntax standardized.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

Suggested reviewers

  • TkDodo

A rabbit hopped through docs all day,
Swapping quotes for parens — hooray!
( Example ) now sits just right,
Markers tidy, comments bright.
New mutation tricks tucked in too —
🐇 hop, hop, review — thump-thump, whew!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: fixing Markdown comment syntax in docs source files.
Description check ✅ Passed The description follows the required template and includes a clear changes summary, checklist, and release impact section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/framework/react/guides/prefetching.md (1)

417-438: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Optionally hyphenate "Server Side" as compound adjective.

Line 436 uses "Server Side routers" which could be hyphenated as "Server-Side routers" for grammatical precision. This is a minor style preference.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/framework/react/guides/prefetching.md` around lines 417 - 438, Update
the wording in the prefetching guide to optionally hyphenate the compound
adjective in the sentence about routers and frameworks. In the “Further reading”
section of the Markdown doc, adjust the phrase used in the sentence near the
Server Rendering & Hydration link so it reads as “Server-Side routers” instead
of “Server Side routers,” keeping the rest of the text unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/framework/react/guides/prefetching.md`:
- Around line 417-438: Update the wording in the prefetching guide to optionally
hyphenate the compound adjective in the sentence about routers and frameworks.
In the “Further reading” section of the Markdown doc, adjust the phrase used in
the sentence near the Server Rendering & Hydration link so it reads as
“Server-Side routers” instead of “Server Side routers,” keeping the rest of the
text unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f55e8356-266a-401d-9bca-9a7550952cb9

📥 Commits

Reviewing files that changed from the base of the PR and between d6798b5 and c2da901.

📒 Files selected for processing (40)
  • docs/framework/angular/guides/query-cancellation.md
  • docs/framework/angular/overview.md
  • docs/framework/angular/quick-start.md
  • docs/framework/react/graphql.md
  • docs/framework/react/guides/advanced-ssr.md
  • docs/framework/react/guides/background-fetching-indicators.md
  • docs/framework/react/guides/default-query-function.md
  • docs/framework/react/guides/dependent-queries.md
  • docs/framework/react/guides/disabling-queries.md
  • docs/framework/react/guides/important-defaults.md
  • docs/framework/react/guides/infinite-queries.md
  • docs/framework/react/guides/initial-query-data.md
  • docs/framework/react/guides/invalidations-from-mutations.md
  • docs/framework/react/guides/migrating-to-v5.md
  • docs/framework/react/guides/mutations.md
  • docs/framework/react/guides/optimistic-updates.md
  • docs/framework/react/guides/paginated-queries.md
  • docs/framework/react/guides/parallel-queries.md
  • docs/framework/react/guides/placeholder-query-data.md
  • docs/framework/react/guides/polling.md
  • docs/framework/react/guides/prefetching.md
  • docs/framework/react/guides/queries.md
  • docs/framework/react/guides/query-cancellation.md
  • docs/framework/react/guides/query-functions.md
  • docs/framework/react/guides/query-invalidation.md
  • docs/framework/react/guides/query-keys.md
  • docs/framework/react/guides/query-options.md
  • docs/framework/react/guides/query-retries.md
  • docs/framework/react/guides/request-waterfalls.md
  • docs/framework/react/guides/updates-from-mutation-responses.md
  • docs/framework/react/guides/window-focus-refetching.md
  • docs/framework/react/installation.md
  • docs/framework/react/overview.md
  • docs/framework/react/quick-start.md
  • docs/framework/react/reference/hydration.md
  • docs/framework/react/reference/queryOptions.md
  • docs/framework/react/typescript.md
  • docs/framework/solid/typescript.md
  • docs/framework/vue/guides/prefetching.md
  • docs/reference/QueryCache.md

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