|
16 | 16 | * Acceptable results from compilers.
|
17 | 17 | *
|
18 | 18 | * To register custom results, add them to
|
19 |
| - * {@link CompileResultMap `CompileResultMap`}. |
| 19 | + * {@linkcode CompileResultMap}. |
20 | 20 | */
|
21 | 21 |
|
22 | 22 | /**
|
|
28 | 28 | * A **compiler** handles the compiling of a syntax tree to something else
|
29 | 29 | * (in most cases, text) (TypeScript type).
|
30 | 30 | *
|
31 |
| - * It is used in the stringify phase and called with a {@link Node `Node`} |
32 |
| - * and {@link VFile `VFile`} representation of the document to compile. |
| 31 | + * It is used in the stringify phase and called with a {@linkcode Node} |
| 32 | + * and {@linkcode VFile} representation of the document to compile. |
33 | 33 | * It should return the textual representation of the given tree (typically
|
34 | 34 | * `string`).
|
35 | 35 | *
|
|
42 | 42 | * > result values.
|
43 | 43 | * >
|
44 | 44 | * > To register custom results in TypeScript, add them to
|
45 |
| - * > {@link CompileResultMap `CompileResultMap`}. |
| 45 | + * > {@linkcode CompileResultMap}. |
46 | 46 | *
|
47 | 47 | * [rehype-react]: https://github.com/rehypejs/rehype-react
|
48 | 48 | * @param {Tree} tree
|
|
61 | 61 | * A **parser** handles the parsing of text to a syntax tree.
|
62 | 62 | *
|
63 | 63 | * It is used in the parse phase and is called with a `string` and
|
64 |
| - * {@link VFile `VFile`} of the document to parse. |
| 64 | + * {@linkcode VFile} of the document to parse. |
65 | 65 | * It must return the syntax tree representation of the given file
|
66 |
| - * ({@link Node `Node`}). |
| 66 | + * ({@linkcode Node}). |
67 | 67 | * @param {string} document
|
68 | 68 | * Document to parse.
|
69 | 69 | * @param {VFile} file
|
|
94 | 94 | * @template {Node | string | undefined} [Input=Node]
|
95 | 95 | * Value that is expected as input (default: `Node`).
|
96 | 96 | *
|
97 |
| - * * If the plugin returns a {@link Transformer `Transformer`}, this |
| 97 | + * * If the plugin returns a {@linkcode Transformer}, this |
98 | 98 | * should be the node it expects.
|
99 |
| - * * If the plugin sets a {@link Parser `Parser`}, this should be |
| 99 | + * * If the plugin sets a {@linkcode Parser}, this should be |
100 | 100 | * `string`.
|
101 |
| - * * If the plugin sets a {@link Compiler `Compiler`}, this should be the |
| 101 | + * * If the plugin sets a {@linkcode Compiler}, this should be the |
102 | 102 | * node it expects.
|
103 | 103 | * @template [Output=Input]
|
104 | 104 | * Value that is yielded as output (default: `Input`).
|
105 | 105 | *
|
106 |
| - * * If the plugin returns a {@link Transformer `Transformer`}, this |
| 106 | + * * If the plugin returns a {@linkcode Transformer}, this |
107 | 107 | * should be the node that that yields.
|
108 |
| - * * If the plugin sets a {@link Parser `Parser`}, this should be the |
| 108 | + * * If the plugin sets a {@linkcode Parser}, this should be the |
109 | 109 | * node that it yields.
|
110 |
| - * * If the plugin sets a {@link Compiler `Compiler`}, this should be |
| 110 | + * * If the plugin sets a {@linkcode Compiler}, this should be |
111 | 111 | * result it yields.
|
112 | 112 | * @typedef {(
|
113 | 113 | * (this: Processor, ...parameters: PluginParameters) =>
|
|
146 | 146 | * @template {Node | string | undefined} [Input=undefined]
|
147 | 147 | * Value that is expected as input (optional).
|
148 | 148 | *
|
149 |
| - * * If the plugin returns a {@link Transformer `Transformer`}, this |
| 149 | + * * If the plugin returns a {@linkcode Transformer}, this |
150 | 150 | * should be the node it expects.
|
151 |
| - * * If the plugin sets a {@link Parser `Parser`}, this should be |
| 151 | + * * If the plugin sets a {@linkcode Parser}, this should be |
152 | 152 | * `string`.
|
153 |
| - * * If the plugin sets a {@link Compiler `Compiler`}, this should be the |
| 153 | + * * If the plugin sets a {@linkcode Compiler}, this should be the |
154 | 154 | * node it expects.
|
155 | 155 | * @template [Output=undefined] (optional).
|
156 | 156 | * Value that is yielded as output.
|
157 | 157 | *
|
158 |
| - * * If the plugin returns a {@link Transformer `Transformer`}, this |
| 158 | + * * If the plugin returns a {@linkcode Transformer}, this |
159 | 159 | * should be the node that that yields.
|
160 |
| - * * If the plugin sets a {@link Parser `Parser`}, this should be the |
| 160 | + * * If the plugin sets a {@linkcode Parser}, this should be the |
161 | 161 | * node that it yields.
|
162 |
| - * * If the plugin sets a {@link Compiler `Compiler`}, this should be |
| 162 | + * * If the plugin sets a {@linkcode Compiler}, this should be |
163 | 163 | * result it yields.
|
164 | 164 | * @typedef {(
|
165 | 165 | * [
|
|
340 | 340 | * VFile :
|
341 | 341 | * VFile & {result: Result}
|
342 | 342 | * )} VFileWithOutput
|
343 |
| - * Type to generate a {@link VFile `VFile`} corresponding to a compiler result. |
| 343 | + * Type to generate a {@linkcode VFile} corresponding to a compiler result. |
344 | 344 | *
|
345 | 345 | * If a result that is not acceptable on a `VFile` is used, that will
|
346 |
| - * be stored on the `result` field of {@link VFile `VFile`}. |
| 346 | + * be stored on the `result` field of {@linkcode VFile}. |
347 | 347 | */
|
348 | 348 |
|
349 | 349 | import {bail} from 'bail'
|
@@ -489,7 +489,7 @@ export class Processor extends CallableInstance {
|
489 | 489 | * @deprecated
|
490 | 490 | * This is a private internal method and should not be used.
|
491 | 491 | * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
492 |
| - * New *unfrozen* processor ({@link Processor `Processor`}) that is |
| 492 | + * New *unfrozen* processor ({@linkcode Processor}) that is |
493 | 493 | * configured to work the same as its ancestor.
|
494 | 494 | * When the descendant processor is configured in the future it does not
|
495 | 495 | * affect the ancestral processor.
|
@@ -525,7 +525,7 @@ export class Processor extends CallableInstance {
|
525 | 525 | * > Call the processor first to create a new unfrozen processor.
|
526 | 526 | *
|
527 | 527 | * > **Note**: to register custom data in TypeScript, augment the
|
528 |
| - * > {@link Data `Data`} interface. |
| 528 | + * > {@linkcode Data} interface. |
529 | 529 | *
|
530 | 530 | * @example
|
531 | 531 | * This example show how to get and set info:
|
@@ -706,7 +706,7 @@ export class Processor extends CallableInstance {
|
706 | 706 | * > result values.
|
707 | 707 | * >
|
708 | 708 | * > To register custom results in TypeScript, add them to
|
709 |
| - * > {@link CompileResultMap `CompileResultMap`}. |
| 709 | + * > {@linkcode CompileResultMap}. |
710 | 710 | *
|
711 | 711 | * [rehype-react]: https://github.com/rehypejs/rehype-react
|
712 | 712 | */
|
@@ -802,7 +802,7 @@ export class Processor extends CallableInstance {
|
802 | 802 | * > result values.
|
803 | 803 | * >
|
804 | 804 | * > To register custom results in TypeScript, add them to
|
805 |
| - * > {@link CompileResultMap `CompileResultMap`}. |
| 805 | + * > {@linkcode CompileResultMap}. |
806 | 806 | *
|
807 | 807 | * [rehype-react]: https://github.com/rehypejs/rehype-react
|
808 | 808 | */
|
@@ -988,7 +988,7 @@ export class Processor extends CallableInstance {
|
988 | 988 | * > result values.
|
989 | 989 | * >
|
990 | 990 | * > To register custom results in TypeScript, add them to
|
991 |
| - * > {@link CompileResultMap `CompileResultMap`}. |
| 991 | + * > {@linkcode CompileResultMap}. |
992 | 992 | *
|
993 | 993 | * [rehype-react]: https://github.com/rehypejs/rehype-react
|
994 | 994 | */
|
|
0 commit comments