C# Class Projbook.Core.Markdown.ProjbookHtmlFormatter

Implements markdown formatter for CommonMark.Net that customize rendering for Projbook integration.
Inheritance: CommonMark.Formatters.HtmlFormatter
Datei anzeigen Open project: defrancea/Projbook Class Usage Examples

Public Methods

Method Description
ProjbookHtmlFormatter ( string contextName, TextWriter target, CommonMark.CommonMarkSettings settings, int sectionTitleBase, Extension.Model.Snippet>.Dictionary snippetDictionary, string snippetReferencePrefix ) : System

Initializes a new instance of ProjbookHtmlFormatter.

Protected Methods

Method Description
WriteBlock ( CommonMark.Syntax.Block block, bool isOpening, bool isClosing, bool &ignoreChildNodes ) : void

Specializes block writing for anchor injection. For each formatted header we generate an anchor based on the context name, the header content and eventually add an integer suffix in order to prevent conflicts.

Private Methods

Method Description
Render ( Node node ) : string

Renders Node.

Render ( Node node, StringBuilder stringBuilder ) : void

Renders Node.

Method Details

ProjbookHtmlFormatter() public method

Initializes a new instance of ProjbookHtmlFormatter.
public ProjbookHtmlFormatter ( string contextName, TextWriter target, CommonMark.CommonMarkSettings settings, int sectionTitleBase, Extension.Model.Snippet>.Dictionary snippetDictionary, string snippetReferencePrefix ) : System
contextName string Initializes the required
target System.IO.TextWriter Initializes the required text writer used as output.
settings CommonMark.CommonMarkSettings Initializes the required common mark settings used by the formatting.
sectionTitleBase int Initializes the section title base.
snippetDictionary Extension.Model.Snippet>.Dictionary Initializes the snippet directory.
snippetReferencePrefix string Initializes the snippet reference prefix.
return System

WriteBlock() protected method

Specializes block writing for anchor injection. For each formatted header we generate an anchor based on the context name, the header content and eventually add an integer suffix in order to prevent conflicts.
protected WriteBlock ( CommonMark.Syntax.Block block, bool isOpening, bool isClosing, bool &ignoreChildNodes ) : void
block CommonMark.Syntax.Block The block to process.
isOpening bool Define whether the block is opening.
isClosing bool Defines whether the block is closing.
ignoreChildNodes bool return whether the processing ignored child nodes.
return void