-
Notifications
You must be signed in to change notification settings - Fork 143
Some reference-style markdown links don't render #685
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
Comments
It seems that the key here is an E.g. Renders fine:
Doesn’t render correctly
|
Fixing two issues: - `SyntaxSupport` should use the `[][]` style link because the link is defined at the bottom of the page. - We need to move the `@Comment` to the end of the page to avoid hitting swiftlang/swift-docc#685 (comment)
My gut feeling then is that the @ethan-kusters, I would love to take a look at how swift-docc is processing documents and work on this, but it probably will eat up some of your time for reviews and guidance. Should I go for it? ;) |
Go for it. If this sounds interesting to you we can help you with questions, guidance, and reviews. |
Description
Disclaimer: capturing the issue, but I'm still working to capture the details and make a reproduction project.
I was onboarding to swift-syntax, reading the docs, and noticed that on https://swiftpackageindex.com/apple/swift-syntax/main/documentation/swiftsyntax/changingswiftsyntax#Adding-and-Removing-Syntax-Nodes, some links defined with square brackets resolve, but some don't.
For example:
The last link does not resolve. Here's it's source code. But
[Swift Compiler repository][Swiftc]
and[swift-stress-tester][swift-stress-tester]
resolve just fine.I actually didn't know [this format of links][is a thing] in Markdown at all — and didn't find anything in Swift-DocC documentaiton about them — so I'm not sure if they are supposed to be supported.
I don't know if this is a
swift-docc
problem, orswift-docc-render
orswift-markdown
— and I'm happy to look into it, diagnose, and work on a fix.Checklist
main
branch of this package.Expected Behavior
All reference-style links should resolve and render as links, as long as the link URL is provided in the markdown source.
For this source file, all links should render, as they all have valid markdown reference links in the bottom of the source file. https://github.com/apple/swift-syntax/blob/5a914f9c07b4db4984e56bed0964f2518dd0dc1d/Sources/SwiftSyntax/Documentation.docc/Contributing/ChangingSwiftSyntax.md?plain=1#L76
Actual behavior
Several links don't resolve and don't convert to links, leaving [{label}][{url}] format.
Steps To Reproduce
I've reproduced the problem locally on Xcode Version 15.0 beta 4 (15A5195m).
I have NOT yet tried reproducing using:
swift-docc-plugin
.swift-docc
from main branch.swift-markdown
and the example source file from swift-syntax.I will do that once I have a chance later today or over the weekend.
Swift-DocC Version Information
No response
Swift Compiler Version Information
The text was updated successfully, but these errors were encountered: