1using System.Threading.Tasks;
13 private readonly
bool hasBlocks =
false;
23 this.hasBlocks = this.CalcHasBlocks();
34 this.hasBlocks = this.CalcHasBlocks();
37 private bool CalcHasBlocks()
40 bool HasBlocks =
false;
41 bool HasSpans =
false;
42 bool Inconsistent =
false;
45 while (!(Loop is
null))
47 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
83 while (!(Loop is
null))
85 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
93 NewChildren.
Add(
new Paragraph(this.
Document, Spans,
true));
111 if (!(Spans is
null))
112 NewChildren.
Add(
new Paragraph(this.
Document, Spans,
true));
Contains a markdown document. This markdown document class supports original markdown,...
Contains some basic statistical information about a Markdown document.
int NrNestedBlocks
Number of nested blocks.
Abstract base class for block elements with children.
Represents a nested block with no special formatting rules in a markdown document.
override bool IsBlockElement
If the element is a block element.
NestedBlock(MarkdownDocument Document, params MarkdownElement[] Children)
Represents a nested block with no special formatting rules in a markdown document.
override MarkdownElementChildren Create(ChunkedList< MarkdownElement > Children, MarkdownDocument Document)
Creates an object of the same type, and meta-data, as the current object, but with content defined by...
NestedBlock(MarkdownDocument Document, ChunkedList< MarkdownElement > Children)
Represents a nested block with no special formatting rules in a markdown document.
override void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
override Task Render(IRenderer Output)
Renders the element.
override bool InlineSpanElement
If the element is an inline span element.
Abstract base class for all markdown elements with a variable number of child elements.
void SetChildren(ChunkedList< MarkdownElement > Children)
Sets the children of the node.
override ChunkedList< MarkdownElement > Children
Any children of the element.
bool HasOneChild
If the element has only one child.
MarkdownElement FirstChild
First child, or null if none.
Abstract base class for all markdown elements.
abstract bool InlineSpanElement
If the element is an inline span element.
MarkdownDocument Document
Markdown document.
MarkdownElement(MarkdownDocument Document)
Abstract base class for all markdown elements.
Node referencing a chunk in a ChunkedList<T>
ChunkNode< T > Next
Next chunk
int Pos
Index after the last element in chunk.
int Start
Index of first element in chunk.
A chunked list is a linked list of chunks of objects of type T .
ChunkNode< T > FirstChunk
First chunk
void Add(T Item)
Adds an item to the collection.
Interface for Markdown renderers.