Fix anchor links being overwritten#3709
Merged
jknack merged 2 commits intojooby-project:3.xfrom Jul 1, 2025
Merged
Conversation
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
jknack
approved these changes
Jul 1, 2025
Member
jknack
left a comment
There was a problem hiding this comment.
Thank you! Any enhancement here is always welcome.
Member
|
All your changes are live, thank you. |
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.
I noticed that the subsection MVC API - Execution Model was being used as the anchor link in the content for the Execution Model heading.
I think this is due to the
tocItemsmethod updating all links in the documents when the id changes rather than just those within it's elementjooby/docs/src/main/java/io/jooby/adoc/DocGenerator.java
Lines 411 to 420 in 5e345b5
I have updated this method to use
hrather thandocand from what I can tell from a manual pass through, all links seem to work.I've also moved the post processing functionality to make use of the inbuilt AsciiDoctorJ post processing extension, this should make the generation process slightly more efficient as it cuts down on the amount of file reads/writes being performed. As this is a separate change that is only tangentially related by being in the same area I can move it to it's own PR if wanted.