Skip to content

fix(internal/godocfx): use correct anchor links#3738

Merged
gcf-merge-on-green[bot] merged 2 commits intomasterfrom
godocfx
Feb 25, 2021
Merged

fix(internal/godocfx): use correct anchor links#3738
gcf-merge-on-green[bot] merged 2 commits intomasterfrom
godocfx

Conversation

@tbpg
Copy link
Copy Markdown
Contributor

@tbpg tbpg commented Feb 25, 2021

This works by pre-processing the package and generating all of the correct anchor links. Then, when converting an ID to a link, we check if the ID is listed in the map of anchors.

It's possible there will be some duplication between IDs. But, that is already an issue because there is no way to know which one is correct to link to. An alternative would be to set the anchor for any duplicated links to "" so they don't link at all. In practice, I don't think this is an issue. So, I left it as-is and we can revisit later if needed.

Fixes #3737.

@tbpg tbpg requested review from a team and codyoss February 25, 2021 16:43
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 25, 2021
Copy link
Copy Markdown
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

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

LGTM!

@tbpg tbpg added the automerge Merge the pull request once unit tests and other checks pass. label Feb 25, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 919039a into master Feb 25, 2021
@gcf-merge-on-green gcf-merge-on-green bot deleted the godocfx branch February 25, 2021 17:38
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

godocfx: page-local anchor links broken

2 participants