1using System.Collections.Generic;
2using System.Threading.Tasks;
12 private readonly
bool hasBlocks =
false;
22 this.hasBlocks = this.CalcHasBlocks();
33 this.hasBlocks = this.CalcHasBlocks();
36 private bool CalcHasBlocks()
38 bool HasBlocks =
false;
39 bool HasSpans =
false;
40 bool Inconsistent =
false;
67 LinkedList<MarkdownElement> NewChildren =
new LinkedList<MarkdownElement>();
68 LinkedList<MarkdownElement> Spans =
null;
70 foreach (MarkdownElement E
in this.Children)
76 NewChildren.AddLast(
new Paragraph(this.
Document, Spans,
true));
80 NewChildren.AddLast(E);
85 Spans =
new LinkedList<MarkdownElement>();
92 NewChildren.AddLast(
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 void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
NestedBlock(MarkdownDocument Document, IEnumerable< MarkdownElement > Children)
Represents a nested block with no special formatting rules in a markdown document.
override Task Render(IRenderer Output)
Renders the element.
override bool InlineSpanElement
If the element is an inline span element.
override MarkdownElementChildren Create(IEnumerable< MarkdownElement > Children, MarkdownDocument Document)
Creates an object of the same type, and meta-data, as the current object, but with content defined by...
Abstract base class for all markdown elements with a variable number of child elements.
void SetChildren(IEnumerable< MarkdownElement > Children)
Sets the children of the node.
override IEnumerable< 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.
virtual bool IsBlockElement
If the element is a block element.
abstract bool InlineSpanElement
If the element is an inline span element.
MarkdownDocument Document
Markdown document.
Interface for Markdown renderers.