1 | import { DocNodeKind, type IDocNodeParameters, DocNode, type IDocNodeParsedParameters } from './DocNode';
|
2 | import type { TokenSequence } from '../parser/TokenSequence';
|
3 |
|
4 |
|
5 |
|
6 | export interface IDocFencedCodeParameters extends IDocNodeParameters {
|
7 | language: string;
|
8 | code: string;
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 | export interface IDocFencedCodeParsedParameters extends IDocNodeParsedParameters {
|
14 | openingFenceExcerpt: TokenSequence;
|
15 | spacingAfterOpeningFenceExcerpt?: TokenSequence;
|
16 | languageExcerpt?: TokenSequence;
|
17 | spacingAfterLanguageExcerpt?: TokenSequence;
|
18 | codeExcerpt: TokenSequence;
|
19 | spacingBeforeClosingFenceExcerpt?: TokenSequence;
|
20 | closingFenceExcerpt: TokenSequence;
|
21 | spacingAfterClosingFenceExcerpt?: TokenSequence;
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare class DocFencedCode extends DocNode {
|
29 | private readonly _openingFenceExcerpt;
|
30 | private readonly _spacingAfterOpeningFenceExcerpt;
|
31 | private _language;
|
32 | private readonly _languageExcerpt;
|
33 | private readonly _spacingAfterLanguageExcerpt;
|
34 | private _code;
|
35 | private readonly _codeExcerpt;
|
36 | private readonly _spacingBeforeClosingFenceExcerpt;
|
37 | private readonly _closingFenceExcerpt;
|
38 | private readonly _spacingAfterClosingFenceExcerpt;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | constructor(parameters: IDocFencedCodeParameters | IDocFencedCodeParsedParameters);
|
44 | /** @override */
|
45 | get kind(): DocNodeKind | string;
|
46 | /**
|
47 | * A name that can optionally be included after the opening code fence delimiter,
|
48 | * on the same line as the three backticks. This name indicates the programming language
|
49 | * for the code, which a syntax highlighter may use to style the code block.
|
50 | *
|
51 | * @remarks
|
52 | * The TSDoc standard requires that the language "ts" should be interpreted to mean TypeScript.
|
53 | * Other languages names may be supported, but this is implementation dependent.
|
54 | *
|
55 | * CommonMark refers to this field as the "info string".
|
56 | *
|
57 | * @privateRemarks
|
58 | * Examples of language strings supported by GitHub flavored markdown:
|
59 | * https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml
|
60 | */
|
61 | get language(): string | 'ts' | '';
|
62 | /**
|
63 | * The text that should be rendered as code.
|
64 | */
|
65 | get code(): string;
|
66 | /** @override */
|
67 | protected onGetChildNodes(): ReadonlyArray<DocNode | undefined>;
|
68 | }
|
69 | //# sourceMappingURL=DocFencedCode.d.ts.map |
\ | No newline at end of file |