-
Notifications
You must be signed in to change notification settings - Fork 131
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
Links to same-page section that start with "#" fail. #632
Comments
This is probably a good first issue for anyone wanting to familiarize themselves with how DocC resolves documentation links. The issue probably exist in Don't hesitate to ping me if you want to work on this and have any questions. |
@d-ronnqvist, I'm just getting started around here, but I would love to work on this. Expect some rough draft on Wednesday night PST. UPD: Yikes! I'm hooked and I'm looking, but grasping the code took longer than I expected. I'll read through the code for a bit more, walk through / debug it, and submit a rough draft. |
Feel free to ask questions if you’re wondering how something works or why something is done the way it is. |
Got it to work, but I'm not entirely sure about side effects. I'll make a pull request for this, and another one with a little documentation addition, and ask a bunch of questions. Huge thank you for being so supportive of beginners! <3 |
Description
It's possible to link to headings (although not topic sections, but that's unrelated) by adding a # and a heading name to the documentation link. For example,
<doc:ArticleName#HeadingName>
.For links to headings on the same page it's possible to omit the article name (or symbol name) and only write
<doc:HeadingName>
. However, adding the leading # causes the link to fail<doc:#HeadingName>
.Checklist
main
branch of this package.Expected Behavior
Both
<doc:HeadingName>
and<doc:#HeadingName>
should link work for linking to a heading on the current page.Actual behavior
<doc:#HeadingName>
result in an error about "" (empty string) not being found at the current page.Steps To Reproduce
In a project with a documentation catalog; add an article with some heading and write a link to that heading on the same page. For example
Swift-DocC Version Information
5.9
Swift Compiler Version Information
The text was updated successfully, but these errors were encountered: