C# Class MarkdownDeep.BlockProcessor

Inheritance: StringScanner
显示文件 Open project: FransBouma/DocNet Class Usage Examples

Public Methods

Method Description
BlockProcessor ( Markdown m, bool MarkdownInHtml ) : System

Private Methods

Method Description
BlockProcessor ( Markdown m, bool MarkdownInHtml, BlockType parentType ) : System
BuildDefinition ( List lines ) : Block
BuildDefinitionLists ( List blocks ) : void
BuildFootnote ( List lines ) : Block
BuildList ( List lines ) : Block
CollapseLines ( List blocks, List lines ) : void
CreateBlock ( ) : Block
EvaluateLine ( ) : Block
EvaluateLine ( Block b ) : BlockType
FreeBlock ( Block b ) : void
FreeBlocks ( List blocks ) : void
GetMarkdownMode ( HtmlTag tag ) : MarkdownInHtmlMode
HandleAlertExtension ( Block b ) : bool

Handles the alert extension: @alert type text @end where text can be anything and has to be handled further. type is: danger, warning, info or neutral.

HandleDocNetExtension ( Block b ) : bool

Handles the docnet extension, starting with '@'. This can be: * @fa- * @alert @end * @tabs @tabsend

HandleFontAwesomeExtension ( Block b ) : bool

Handles the font awesome extension, which is available in DocNet mode. FontAwesome extension uses @fa-iconname, where iconname is the name of the fontawesome icon. Called when '@fa-' has been seen. Current position is on 'f' of 'fa-'.

HandleSnippetExtension ( Block b ) : bool

Handles the snippet extension: @snippet language [filename] pattern where 'language' can be: cs, xml or txt. If something else, txt is used '[filename]' is evaluated relatively to the document location of the current document. 'pattern' is the pattern passed to the extractor, which is determined based on the language. This is Projbook code. The read snippet is wrapped in a fenced code block with language as language marker, except for txt, which will get 'nohighlight'. This fenced code block is then parsed again and that result is returned as b's data.

HandleTabForTabsExtension ( Block b ) : bool

Handles the tab for tabs extension. This is a docnet extension and it handles: @tab tab head text tab content @end

HandleTabsExtension ( Block b ) : bool
Process ( string str ) : List
ProcessFencedCodeBlock ( Block b ) : bool
ProcessMarkdownEnabledHtml ( Block b, HtmlTag openingTag, MarkdownInHtmlMode mode ) : bool
RenderLines ( List lines ) : string
ScanHtml ( Block b ) : bool
ScanLines ( ) : List
ScanLines ( string str ) : List
ScanLines ( string str, int start, int len ) : List
StartTable ( TableSpec spec, List lines ) : bool

Method Details

BlockProcessor() public method

public BlockProcessor ( Markdown m, bool MarkdownInHtml ) : System
m Markdown
MarkdownInHtml bool
return System