Skip to content

Commit 6e0123d

Browse files
authored
add more information about inline linking (#1339)
1 parent f9d111c commit 6e0123d

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

runtime/reference/cli/doc.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,20 @@ These lints are meant to help you write better documentation and speed up
7878
type-checking in your projects. If any problems are found, the program exits
7979
with non-zero exit code and the output is reported to standard error.
8080

81-
## Supported JSDoc tags
81+
## Supported JSDoc features and tags
8282

8383
Deno implements a large set of JSDoc tags, but does not strictly adhere to the
8484
JSDoc standard, but rather align with sensible standards and features provided
8585
by widely used tools and ecosystems in the same feature-space, like
86-
[TSDoc](https://tsdoc.org/) and [TypeDoc](https://typedoc.org/). The following
87-
tags are supported:
86+
[TSDoc](https://tsdoc.org/) and [TypeDoc](https://typedoc.org/).
87+
88+
For any free-form text places, ie the main description of a JSDoc comment, the
89+
description of a parameter, etc. accept markdown.
90+
91+
### Supported Tags
92+
93+
The following tags are supported, being a selection of tags used and specified
94+
by JSDoc, TSDoc and TypeDoc:
8895

8996
- [`constructor`/`class`](https://jsdoc.app/tags-class): mark a function to be a
9097
constructor.
@@ -143,11 +150,25 @@ tags are supported:
143150
- [`default`](https://jsdoc.app/tags-default): define the default value for a
144151
variable, property or field.
145152

146-
Another supported feature is linking to other symbols and modules.
153+
### Inline Linking
154+
155+
Inline links let you specify links to other parts of the page, other symbols, or
156+
modules. Besides just supporting markdown-style links,
157+
[JSDoc style inline-links](https://jsdoc.app/tags-inline-link) are also
158+
supported.
159+
160+
For example, you can do`{@link https://docs.deno.com}`, which will be rendered
161+
as the following 'https://docs.deno.com'. `{@linkcode https://docs.deno.com}`
162+
can also be used, to make it in a monospace font, and will be rendered roughly
163+
like this: '`https://docs.deno.com`'.
164+
165+
You can also specify a replacement label, via
166+
`{@link https://docs.deno.com | Deno Docs}`, which will use the text after `|`
167+
as the text to display instead of the link. The previous example would render as
168+
'[Deno Docs](https://docs.deno.com)'.
147169

148170
You can add inline links in your descriptions to other symbols via
149-
`{@link MySymbol}` and `{@linkcode MySymbol}`, where the latter will use
150-
monospace inlined code formatting.
171+
`{@link MySymbol}`.
151172

152173
For module linking, the same applies, but you use the `{@link [myModule]}`
153174
syntax. You can also link to symbols in a different module via

0 commit comments

Comments
 (0)