-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaladoc: fix issues with incorrect external links and special characters #14516
Conversation
Unit tests for links with "#" character were also added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e834986
to
6ad301f
Compare
This includes both fixing links found in searchbar, and ones accessible from method names. In searchbar, links are resolved based on whether they are absolute (pointing to an external website, like java docs) or relative (pointing to another sub-website, with root being appended on runtime). This is achieved by serializing another boolean field in PageEntry.
6ad301f
to
213e275
Compare
Thank you for spotting this as this was not something that happened locally, now I've updated the PR with fixes. I no longer use new URI(_).isAbsolute() as URI parsing seemed to be the issue. Instead, an additional filed for searchData was added describing whether the searchData contains an internal link or one to the external website. A similar technique with URIs was employed in a previous PR with Inkuire and, as it turns out, the issues would also happen there (just much more rarely), so I updated that in a separate commit. Unfortunately, as I could not add any new fields there the solution ended up being a little "hacky", but I hope it is at least explained elegantly in the comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
Thank you for the fixes! |
This includes escaping certain characters found in searchbar links (1st commit) and correctly resolving external links (2nd commit).
Fixes #14505 and #14504.