/
IFencedBlock.cs
98 lines (84 loc) · 3.87 KB
/
IFencedBlock.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using Markdig.Helpers;
namespace Markdig.Syntax
{
/// <summary>
/// A common interface for fenced block (e.g: <see cref="FencedCodeBlock"/> or <see cref="Extensions.CustomContainers.CustomContainer"/>)
/// </summary>
public interface IFencedBlock : IBlock
{
/// <summary>
/// Gets or sets the fenced character used to open and close this fenced code block.
/// </summary>
char FencedChar { get; set; }
/// <summary>
/// Gets or sets the fenced character count used to open this fenced code block.
/// </summary>
int OpeningFencedCharCount { get; set; }
/// <summary>
/// Gets or sets the trivia after the <see cref="FencedChar"/>.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice TriviaAfterFencedChar { get; set; }
/// <summary>
/// Gets or sets the language parsed after the first line of
/// the fenced code block. May be null.
/// </summary>
string? Info { get; set; }
/// <summary>
/// Non-escaped <see cref="Info"/> exactly as in source markdown.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice UnescapedInfo { get; set; }
/// <summary>
/// Gets or sets the trivia after the <see cref="Info"/>.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice TriviaAfterInfo { get; set; }
/// <summary>
/// Gets or sets the arguments after the <see cref="Info"/>.
/// May be null.
/// </summary>
string? Arguments { get; set; }
/// <summary>
/// Non-escaped <see cref="Arguments"/> exactly as in source markdown.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice UnescapedArguments { get; set; }
/// <summary>
/// Gets or sets the trivia after the <see cref="Arguments"/>.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice TriviaAfterArguments { get; set; }
/// <summary>
/// Newline of the line with the opening fenced chars.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="NewLine.None"/>.
/// </summary>
NewLine InfoNewLine { get; set; }
/// <summary>
/// Trivia before the closing fenced chars
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="StringSlice.Empty"/>.
/// </summary>
StringSlice TriviaBeforeClosingFence { get; set; }
/// <summary>
/// Gets or sets the fenced character count used to close this fenced code block.
/// </summary>
int ClosingFencedCharCount { get; set; }
/// <summary>
/// Newline after the last line, which is always the line containing the closing fence chars.
/// "Inherited" from <see cref="Block.NewLine"/>.
/// Trivia: only parsed when <see cref="MarkdownPipeline.TrackTrivia"/> is enabled, otherwise
/// <see cref="NewLine.None"/>.
/// </summary>
NewLine NewLine { get; set; }
}
}