Skip to content

fix: generate GitHub-compatible RPC doc anchors#5136

Merged
zhangsoledad merged 1 commit intonervosnetwork:developfrom
eval-exec:exec/rpc-doc-link
Mar 23, 2026
Merged

fix: generate GitHub-compatible RPC doc anchors#5136
zhangsoledad merged 1 commit intonervosnetwork:developfrom
eval-exec:exec/rpc-doc-link

Conversation

@eval-exec
Copy link
Collaborator

What problem does this PR solve?

Problem Summary:
Generated anchors for generic RPC doc types use _for_, so links like ResponseFormat<HeaderView> are broken on GitHub.

What is changed and how it works?

What's Changed:
Generate GitHub-compatible heading anchors in rpc-gen, add a unit test, and regenerate rpc/README.md.

Related changes

None.

Check List

Tests

  • Unit test

@eval-exec eval-exec requested a review from a team as a code owner March 10, 2026 03:19
@eval-exec eval-exec requested review from Copilot and doitian and removed request for a team March 10, 2026 03:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes broken intra-document links in the generated RPC documentation on GitHub by updating rpc-gen to produce GitHub-compatible heading anchor slugs for generic type names (e.g., ResponseFormat<HeaderView>).

Changes:

  • Update anchor slug generation to match GitHub’s heading anchor behavior for generic type names.
  • Add unit tests validating anchor generation for generic and non-generic type names.
  • Regenerate rpc/README.md so all affected links use the new anchors.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
devtools/doc/rpc-gen/src/gen.rs Changes type_name_to_anchor to a GitHub-compatible slugger for type headings and adds unit tests.
rpc/README.md Regenerated RPC docs updating links from _for_-based anchors to GitHub-compatible anchors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenyukang chenyukang enabled auto-merge March 10, 2026 03:25
@chenyukang chenyukang added this pull request to the merge queue Mar 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 11, 2026
@driftluo driftluo added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 11, 2026
@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 11, 2026
@eval-exec eval-exec added this pull request to the merge queue Mar 17, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 17, 2026
@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 18, 2026
@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 23, 2026
Merged via the queue into nervosnetwork:develop with commit 1e54b95 Mar 23, 2026
51 checks passed
@nervos-bot nervos-bot bot mentioned this pull request Mar 22, 2026
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.

5 participants