C# Класс Projbook.Core.Markdown.ProjbookHtmlFormatter

Implements markdown formatter for CommonMark.Net that customize rendering for Projbook integration.
Наследование: CommonMark.Formatters.HtmlFormatter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ProjbookHtmlFormatter ( string contextName, TextWriter target, CommonMark.CommonMarkSettings settings, int sectionTitleBase, Extension.Model.Snippet>.Dictionary snippetDictionary, string snippetReferencePrefix ) : System

Initializes a new instance of ProjbookHtmlFormatter.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
Render ( Node node ) : string

Renders Node.

Render ( Node node, StringBuilder stringBuilder ) : void

Renders Node.

Описание методов

ProjbookHtmlFormatter() публичный Метод

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.
Результат System

WriteBlock() защищенный Метод

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.
Результат void