MarkdownElementExtensions
Namespace: TagBites.Text.Markdown
Assembly: TagBites.Text.Markdown.dll
Product: TagBites.Text.Markdown v. 2.2.0
Appends an element to the element the method is called on.
public static class MarkdownElementExtensionsInheritance: object → MarkdownElementExtensions
Remarks
Section titled “Remarks”Every method returns the element it was called on, with the type it was called with, so a chain keeps its type. A method exists only where a single call produces a complete element. WithElement(T, MarkdownElement) appends a list, a table or an empty quote, which need configuring first.
Methods
Section titled “Methods”WithCheckChildItem<T>(T, bool, MarkdownText)
Section titled “WithCheckChildItem<T>(T, bool, MarkdownText)”Adds an item with a check box nested under item, which produces siblings.
public static T WithCheckChildItem(this T item, this bool isChecked, this MarkdownText text)Parameters
Section titled “Parameters”itemTisCheckedbooltextMarkdownText
Returns
Section titled “Returns”T
WithCheckItem<T>(T, bool, MarkdownText)
Section titled “WithCheckItem<T>(T, bool, MarkdownText)”Adds an item with a check box to list.
public static T WithCheckItem(this T list, this bool isChecked, this MarkdownText text)Parameters
Section titled “Parameters”listTisCheckedbooltextMarkdownText
Returns
Section titled “Returns”T
WithChildItem<T>(T, MarkdownText)
Section titled “WithChildItem<T>(T, MarkdownText)”Adds an item nested under item, which produces siblings.
public static T WithChildItem(this T item, this MarkdownText text)Parameters
Section titled “Parameters”itemTtextMarkdownText
Returns
Section titled “Returns”T
WithChildItem<T>(T, MarkdownListItem)
Section titled “WithChildItem<T>(T, MarkdownListItem)”Adds an item that is already built, nested under item.
public static T WithChildItem(this T item, this MarkdownListItem child)Parameters
Section titled “Parameters”itemTchildMarkdownListItem
Returns
Section titled “Returns”T
WithCode<T>(T, string)
Section titled “WithCode<T>(T, string)”Adds a code block without a language.
public static T WithCode(this T content, this string code)Parameters
Section titled “Parameters”contentTcodestring
Returns
Section titled “Returns”T
WithCode<T>(T, string, string)
Section titled “WithCode<T>(T, string, string)”Adds a code block written in language.
public static T WithCode(this T content, this string language, this string code)Parameters
Section titled “Parameters”Returns
Section titled “Returns”T
WithElement<T>(T, MarkdownElement)
Section titled “WithElement<T>(T, MarkdownElement)”Adds an element that is already built.
public static T WithElement(this T content, this MarkdownElement element)Parameters
Section titled “Parameters”contentTelementMarkdownElement
Returns
Section titled “Returns”T
WithHeader<T>(T, int, MarkdownText)
Section titled “WithHeader<T>(T, int, MarkdownText)”Adds a header with an explicit level.
public static T WithHeader(this T content, this int level, this MarkdownText text)Parameters
Section titled “Parameters”contentTlevelinttextMarkdownText
Returns
Section titled “Returns”T
WithHtml<T>(T, string)
Section titled “WithHtml<T>(T, string)”Adds a block of raw HTML and returns it.
public static T WithHtml(this T content, this string html)Parameters
Section titled “Parameters”contentThtmlstring
Returns
Section titled “Returns”T
Remarks
Section titled “Remarks”The markup reaches the output unchanged, so it must not be built from untrusted text.
WithItem<T>(T, MarkdownText)
Section titled “WithItem<T>(T, MarkdownText)”Adds an item to list.
public static T WithItem(this T list, this MarkdownText text)Parameters
Section titled “Parameters”listTtextMarkdownText
Returns
Section titled “Returns”T
WithItem<T>(T, MarkdownListItem)
Section titled “WithItem<T>(T, MarkdownListItem)”Adds an item that is already built.
public static T WithItem(this T list, this MarkdownListItem item)Parameters
Section titled “Parameters”listTitemMarkdownListItem
Returns
Section titled “Returns”T
WithParagraph<T>(T, MarkdownText)
Section titled “WithParagraph<T>(T, MarkdownText)”Adds a paragraph.
public static T WithParagraph(this T content, this MarkdownText text)Parameters
Section titled “Parameters”contentTtextMarkdownText
Returns
Section titled “Returns”T
WithQuote<T>(T, MarkdownText)
Section titled “WithQuote<T>(T, MarkdownText)”Adds a quote that starts with quote.
public static T WithQuote(this T content, this MarkdownText quote)Parameters
Section titled “Parameters”contentTquoteMarkdownText
Returns
Section titled “Returns”T
WithSection<T>(T, MarkdownText)
Section titled “WithSection<T>(T, MarkdownText)”Adds a section one level below content.
public static T WithSection(this T content, this MarkdownText text)Parameters
Section titled “Parameters”contentTtextMarkdownText
Returns
Section titled “Returns”T
WithSection<T>(T, int, MarkdownText)
Section titled “WithSection<T>(T, int, MarkdownText)”Adds a section whose header carries an explicit level.
public static T WithSection(this T content, this int level, this MarkdownText text)Parameters
Section titled “Parameters”contentTlevelinttextMarkdownText
Returns
Section titled “Returns”T
WithThematicBreak<T>(T)
Section titled “WithThematicBreak<T>(T)”Adds a thematic break.
public static T WithThematicBreak(this T content)Parameters
Section titled “Parameters”contentT
Returns
Section titled “Returns”T