Class cebe\markdown\latex\GithubMarkdown

Inheritancecebe\markdown\latex\GithubMarkdown » cebe\markdown\latex\Markdown » cebe\markdown\Parser
Uses Traitscebe\markdown\block\CodeTrait, cebe\markdown\block\FencedCodeTrait, cebe\markdown\block\HeadlineTrait, cebe\markdown\block\ListTrait, cebe\markdown\block\QuoteTrait, cebe\markdown\block\RuleTrait, cebe\markdown\block\TableTrait, cebe\markdown\inline\CodeTrait, cebe\markdown\inline\EmphStrongTrait, cebe\markdown\inline\LinkTrait, cebe\markdown\inline\StrikeoutTrait, cebe\markdown\inline\UrlLinkTrait

Markdown parser for github flavored markdown.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$enableNewlines boolean Whether to interpret newlines as <br />-tags. cebe\markdown\latex\GithubMarkdown
$keepListStartNumber bool Enable support start attribute of ordered lists. cebe\markdown\block\ListTrait
$labelPrefix string This string will be prefixed to all auto generated labels. cebe\markdown\latex\Markdown
$maximumNestingLevel integer The maximum nesting level for language elements. cebe\markdown\Parser

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$context string The current context the parser is in. cebe\markdown\Parser
$escapeCharacters cebe\markdown\latex\GithubMarkdown
$references array A list of defined references in this document. cebe\markdown\inline\LinkTrait

Public Methods

Hide inherited methods

MethodDescriptionDefined By
parse() Parses the given text considering the full language. cebe\markdown\Parser
parseParagraph() Parses a paragraph without block elements (block elements are ignored). cebe\markdown\Parser

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
blockTypes() cebe\markdown\Parser
cleanup() This method will be called after parse() and parseParagraph(). cebe\markdown\Parser
consumeCode() Consume lines for a code block element cebe\markdown\block\CodeTrait
consumeFencedCode() Consume lines for a fenced code block cebe\markdown\block\FencedCodeTrait
consumeHeadline() Consume lines for a headline cebe\markdown\block\HeadlineTrait
consumeHr() Consume a horizontal rule cebe\markdown\block\RuleTrait
consumeOl() Consume lines for an ordered list cebe\markdown\block\ListTrait
consumeParagraph() Consume lines for a paragraph cebe\markdown\latex\Markdown
consumeQuote() Consume lines for a blockquote element cebe\markdown\block\QuoteTrait
consumeReference() Consume link references cebe\markdown\inline\LinkTrait
consumeTable() Consume lines for a table cebe\markdown\block\TableTrait
consumeUl() Consume lines for an unordered list cebe\markdown\block\ListTrait
detectLineType() Given a set of lines and an index of a current line it uses the registed block types to detect the type of this line. cebe\markdown\Parser
escapeLatex() Escape special LaTeX characters cebe\markdown\latex\Markdown
escapeUrl() Escape special characters in URLs cebe\markdown\latex\Markdown
identifyCode() Identify a line as the beginning of a code block. cebe\markdown\block\CodeTrait
identifyFencedCode() Identify a line as the beginning of a fenced code block. cebe\markdown\block\FencedCodeTrait
identifyHeadline() Identify a line as a headline cebe\markdown\block\HeadlineTrait
identifyHr() Identify a line as a horizontal rule. cebe\markdown\block\RuleTrait
identifyOl() Identify a line as the beginning of an ordered list. cebe\markdown\block\ListTrait
identifyQuote() Identify a line as the beginning of a block quote. cebe\markdown\block\QuoteTrait
identifyReference() cebe\markdown\inline\LinkTrait
identifyTable() Identify a line as the beginning of a table block. cebe\markdown\block\TableTrait
identifyUl() Identify a line as the beginning of an unordered list. cebe\markdown\block\ListTrait
inlineMarkers() Returns a map of inline markers to the corresponding parser methods. cebe\markdown\Parser
lookupReference() cebe\markdown\inline\LinkTrait
parseBlocks() cebe\markdown\block\QuoteTrait
parseEmphStrong() Parses empathized and strong elements. cebe\markdown\inline\EmphStrongTrait
parseEscape() Parses escaped special characters. cebe\markdown\Parser
parseImage() Parses an image indicated by ![. cebe\markdown\inline\LinkTrait
parseInline() cebe\markdown\block\TableTrait
parseInlineCode() Parses an inline code span `. cebe\markdown\inline\CodeTrait
parseLink() Parses a link indicated by [. cebe\markdown\inline\LinkTrait
parseLinkOrImage() cebe\markdown\inline\LinkTrait
parseLt() Parses inline HTML. cebe\markdown\inline\LinkTrait
parseStrike() Parses the strikethrough feature. cebe\markdown\inline\StrikeoutTrait
parseTd() cebe\markdown\latex\GithubMarkdown
parseUrl() Parses urls and adds auto linking feature. cebe\markdown\inline\UrlLinkTrait
prepare() This method will be called before parse() and parseParagraph(). cebe\markdown\latex\Markdown
renderAbsy() cebe\markdown\block\TableTrait
renderAutoUrl() cebe\markdown\latex\GithubMarkdown
renderCode() cebe\markdown\latex\GithubMarkdown
renderEmail() cebe\markdown\inline\LinkTrait
renderEmph() cebe\markdown\inline\EmphStrongTrait
renderHeadline() Renders a headline cebe\markdown\block\HeadlineTrait
renderHr() Renders a horizontal rule cebe\markdown\block\RuleTrait
renderImage() cebe\markdown\inline\LinkTrait
renderInlineCode() cebe\markdown\inline\CodeTrait
renderLabel() Renders a reference label cebe\markdown\latex\Markdown
renderLink() cebe\markdown\inline\LinkTrait
renderList() Renders a list cebe\markdown\block\ListTrait
renderParagraph() Render a paragraph block cebe\markdown\latex\Markdown
renderQuote() Renders a blockquote cebe\markdown\block\QuoteTrait
renderStrike() cebe\markdown\latex\GithubMarkdown
renderStrong() cebe\markdown\inline\EmphStrongTrait
renderTable() cebe\markdown\latex\GithubMarkdown
renderTableSep() cebe\markdown\latex\GithubMarkdown
renderText() cebe\markdown\latex\GithubMarkdown
renderUrl() cebe\markdown\inline\LinkTrait

Property Details

$enableNewlines public property

Whether to interpret newlines as <br />-tags. This feature is useful for comments where newlines are often meant to be real new lines.

public boolean $enableNewlines false
$escapeCharacters protected property
protected $escapeCharacters = ['\\''`''*''_''{''}''['']''('')''#''+''-''.''!''<''>'':''|']

Method Details

parseTd() protected method

protected void parseTd ( $markdown )
renderAutoUrl() protected method

protected void renderAutoUrl ( $block )
renderCode() protected method

protected void renderCode ( $block )
renderStrike() protected method

protected void renderStrike ( $block )
renderTable() protected method

protected void renderTable ( $block )
renderTableSep() protected method

protected void renderTableSep ( $block )
renderText() protected method

protected void renderText ( $text )