C# Class Projbook.Core.Markdown.ProjbookHtmlFormatter

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
Render ( Node node ) : string

Renders Node.

Render ( Node node, StringBuilder stringBuilder ) : void

Renders Node.

Method Details

ProjbookHtmlFormatter() public méthode

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.
Résultat System

WriteBlock() protected méthode

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.
Résultat void