-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fix broken link and missing space in @Resources documentation #810
Fix broken link and missing space in @Resources documentation #810
Conversation
@@ -8,7 +8,7 @@ Displays a set of links to related resources, like downloads, sample code, and v | |||
|
|||
## Overview | |||
|
|||
Use the `Resources` directive to include a Resources section at the bottom of a tutorial's table of contents page. This optional section can offer links to helpful material for continued learning. Provide some text for the top of the section, then add directives, for example``Documentation``, ``Downloads``, ``Forums``, ``SampleCode``, and ``Videos`) for the resource types you want to share. | |||
Use the `Resources` directive to include a Resources section at the bottom of a tutorial's table of contents page. This optional section can offer links to helpful material for continued learning. Provide some text for the top of the section, then add directives, for example ``Documentation``, ``Downloads``, ``Forums``, ``SampleCode``, and ``Videos``) for the resource types you want to share. |
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.
I wonder if there's any way we could emit a diagnostic for this? Seems like a missing backtick will be a common typo.
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.
That's a good idea but it would probably need to be fixed in Swift Markdown.
The missing backtick makes the link text not parse as its own element. For example, the correct link (below) parses as:
Some text with a ``Link`` followed by some more text.
Paragraph
├─ Text "Some text with a "
├─ SymbolLink destination: Link
└─ Text " followed by some more text."
and a single backtick before and after pages as:
Some text with a `Link` followed by some more text.
Paragraph
├─ Text "Some text with a "
├─ InlineCode `Link`
└─ Text " followed by some more text."
but double backticks before and a single backtick after just parses as a single text element
Some text with a ``Link` followed by some more text.
Paragraph
└─ Text "Some text with a ``Link` followed by some more text."
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.
I opened this issue about this swiftlang/swift-markdown#165
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.
Great thanks for filing that 👍 ... and I'm guessing there might be more edge cases to handle, like if there is more than one mistake in the same paragraph, or if the author really wanted a single backtick for code voice. Not an obvious fix.
@swift-ci please test |
Bug/issue #, if applicable: rdar://102737063
Summary
This fixes a broken link and a missing space on https://www.swift.org/documentation/docc/resources
Dependencies
None
Testing
swift run docc preview Sources/docc/DocCDocumentation.docc
Videos
link resolved and works.Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added tests./bin/test
script and it succeeded