-
Notifications
You must be signed in to change notification settings - Fork 3k
docs: fix broken links in documentation #6380
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
docs: fix broken links in documentation #6380
Conversation
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.
thanks a lot for fixing this
| * @param kind Always `'N'` | ||
| * @param value The value to notify with if observed. | ||
| * @deprecated Internal implementation detail. Use {@link createNext} instead. | ||
| * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead. |
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.
Do links declared like this render correctly in the app? My understanding is that custom link text has to be placed after a |, like this:
{@link Notification#createNext | createNext}
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.
@niklas-wortmann @tmair thoughts?
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.
Do links declared like this render correctly in the app?
Yes they do. And the reason why is that documentation generation does not depend ontsdocbut on thedgenianddegeni-packagespackages. For@linkextraction the following two files are important:
- https://github.com/ReactiveX/rxjs/blob/86cce743334cf1b05f2a9f2ad182452aa3785a6e/docs_app/tools/transforms/links-package/inline-tag-defs/link.js
- https://github.com/ReactiveX/rxjs/blob/86cce743334cf1b05f2a9f2ad182452aa3785a6e/docs_app/tools/transforms/links-package/services/getLinkInfo.js
There is a RegExp in the link.js file
| var INLINE_LINK = /(\S+)(?:\s+([\s\S]+))?/; |
@link content which is basically of the form ${url} ${link name}. So that is the reason why this works for the documentation home page.
There is however another issue that is related to how @links are parsed and shown in IDEs. As there is no standard for JS/TS documentation each IDE or Editor seems to ship its own slightly different version for @link processing and parsing. These are the ones I know of but this list is not exhaustive:
- VSCode: There has been a recent addition to better support
@linkprocessing and display in TypeScript which then also benefits VSCode. It should be included in TS 4.3 Editor support for link tag microsoft/TypeScript#41877 - TSDoc: TSDoc is an effort to add a standard for TS documentation. The
@linkproposal is still in discussion (There are a number of tricky issues regarding this simple tag RFC: Syntax for "declaration references" (hyperlinks) microsoft/tsdoc#9). Currently it seems that TSDoc is used by APIExtractor to generate documentation (similar to dgeni)
So long story short: I would like to look into the recent addition of @link parsing to TS and its compatibility or incompatibility with TSDoc a little closer. So for now I am fine if this PR still stays open a little longer. I don't exactly know when I will have time to dig a little deeper into all of this as I am not too familiar with dgeni or the TSDoc project.
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.
Actually, Angular has so many examples of these links; one of them:
This is how it looks like in the docs:
https://angular.io/api/forms/FormGroupName#access-individual-controls-in-the-group
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.
@tmair Thanks for the super-thorough comment. 👍
Description:
This PR fixes broken links within the documentation that are reported by the build of the documentation.
Two examples of the broken links can be found on the Global Config documentation page.
Related issue (if exists):
None