Skip to content

MKHTMLRenderer

Implements MKRenderer

Description

A class for rendering a MArkdown abstract syntax tree into HTML.

Properties

Name Type Read-Only
mOutput() String
ShouldTrimLeadingWhitespace Boolean
ShouldTrimTrailingWhitespace Boolean

Methods

Name Parameters Returns
EncodePredefinedEntities s As String String
SpacesString count As Integer String
URLEncode s As String String
VisitATXHeading atx As MKATXHeadingBlock Variant
VisitBlock b As MKBlock Variant
VisitBlockQuote bq As MKBlockQuote Variant
VisitCodeSpan cs As MKCodeSpan Variant
VisitDocument doc As MKDocument Variant
VisitEmphasis e As MKEmphasis Variant
VisitFencedCode fc As MKFencedCodeBlock Variant
VisitHTMLBlock html As MKHTMLBlock Variant
VisitIndentedCode ic As MKIndentedCodeBlock Variant
VisitInlineHTML html As MKInlineHTML Variant
VisitInlineImage image As MarkdownKit.MKInlineImage Variant
VisitInlineLink link As MarkdownKit.MKInlineLink Variant
VisitInlineText it As MKInlineText Variant
VisitList list As MKListBlock Variant
VisitListItem item As MKListItemBlock Variant
VisitParagraph p As MKParagraphBlock Variant
VisitSetextHeading stx As MKSetextHeadingBlock Variant
VisitSoftBreak sb As MKSoftBreak Variant
VisitStrongEmphasis se As MKStrongEmphasis Variant
VisitTextBlock tb As MKTextBlock Variant
VisitThematicBreak tb As MKThematicBreak Variant

Property Descriptions

mOutput() As String

The under-construction output of the renderer.


ShouldTrimLeadingWhitespace As Boolean

True if the renderer should trim leading whitespace from inline text before rendering it.


ShouldTrimTrailingWhitespace As Boolean

True if the renderer should trim trailing whitespace from inline text before rendering it.


Method Descriptions

EncodePredefinedEntities(s As String) As String

Encodes the 4 predefined entities to make them XML-safe.

https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML


SpacesString(count As Integer) As String

Returns a string consisting of count spaces.


URLEncode(s As String) As String

URL encodes common characters.

NB: URL encoding is much more complex than this but this covers most use cases.


VisitATXHeading(atx As MKATXHeadingBlock) As Variant

Part of the MKRenderer interface.


VisitBlock(b As MKBlock) As Variant

Part of the MKRenderer interface.

Should not be called when rendering HTML.


VisitBlockQuote(bq As MKBlockQuote) As Variant

Part of the MKRenderer interface.


VisitCodeSpan(cs As MKCodeSpan) As Variant

Part of the MKRenderer interface.


VisitDocument(doc As MKDocument) As Variant

Part of the MKRenderer interface.


VisitEmphasis(e As MKEmphasis) As Variant

Part of the MKRenderer interface.


VisitFencedCode(fc As MKFencedCodeBlock) As Variant

Part of the MKRenderer interface.


VisitHTMLBlock(html As MKHTMLBlock) As Variant

Part of the MKRenderer interface.


VisitIndentedCode(ic As MKIndentedCodeBlock) As Variant

Part of the MKRenderer interface.


VisitInlineHTML(html As MKInlineHTML) As Variant

Part of the MKRenderer interface.


VisitInlineImage(image As MarkdownKit.MKInlineImage) As Variant

Part of the MKRenderer interface.


VisitInlineLink(link As MarkdownKit.MKInlineLink) As Variant

Part of the MKRenderer interface.


VisitInlineText(it As MKInlineText) As Variant

Part of the MKRenderer interface.


VisitList(list As MKListBlock) As Variant

Part of the MKRenderer interface.


VisitListItem(item As MKListItemBlock) As Variant

Part of the MKRenderer interface.


VisitParagraph(p As MKParagraphBlock) As Variant

Part of the MKRenderer interface.


VisitSetextHeading(stx As MKSetextHeadingBlock) As Variant

Part of the MKRenderer interface.


VisitSoftBreak(sb As MKSoftBreak) As Variant

Part of the MKRenderer interface.


VisitStrongEmphasis(se As MKStrongEmphasis) As Variant

Part of the MKRenderer interface.


VisitTextBlock(tb As MKTextBlock) As Variant

Part of the MKRenderer interface.


VisitThematicBreak(tb As MKThematicBreak) As Variant

Part of the MKRenderer interface.