Class cebe\markdown\latex\Markdown

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

Markdown parser for the initial markdown spec.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$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 array These are "escapeable" characters. cebe\markdown\latex\Markdown
$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
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
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
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
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\HeadlineTrait
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
prepare() This method will be called before parse() and parseParagraph(). cebe\markdown\latex\Markdown
renderAbsy() cebe\markdown\block\HeadlineTrait
renderCode() cebe\markdown\latex\Markdown
renderEmail() cebe\markdown\latex\Markdown
renderEmph() cebe\markdown\latex\Markdown
renderHeadline() cebe\markdown\latex\Markdown
renderHr() cebe\markdown\latex\Markdown
renderImage() cebe\markdown\latex\Markdown
renderInlineCode() cebe\markdown\latex\Markdown
renderLabel() Renders a reference label cebe\markdown\latex\Markdown
renderLink() cebe\markdown\latex\Markdown
renderList() cebe\markdown\latex\Markdown
renderParagraph() Render a paragraph block cebe\markdown\latex\Markdown
renderQuote() cebe\markdown\latex\Markdown
renderStrong() cebe\markdown\latex\Markdown
renderText() cebe\markdown\latex\Markdown
renderUrl() cebe\markdown\latex\Markdown

Property Details

$escapeCharacters protected property

These are "escapeable" characters. When using one of these prefixed with a backslash, the character will be outputted without the backslash and is not interpreted as markdown.

protected array $escapeCharacters = ['\\''`''*''_''{''}''['']''('')''#''+''-''.''!''<''>']
$labelPrefix public property

This string will be prefixed to all auto generated labels. This can be used to disambiguate labels when combining multiple markdown files into one document.

public string $labelPrefix ''

Method Details

consumeParagraph() protected method

Consume lines for a paragraph

Allow headlines and code to break paragraphs

protected void consumeParagraph ( $lines, $current )
escapeLatex() protected method

Escape special LaTeX characters

protected void escapeLatex ( $string )
escapeUrl() protected method

Escape special characters in URLs

protected void escapeUrl ( $string )
prepare() protected method

This method will be called before parse() and parseParagraph().

You can override it to do some initialization work.

protected void prepare ( )
renderCode() protected method

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

protected void renderEmail ( $block )
renderEmph() protected method

protected void renderEmph ( $block )
renderHeadline() protected method

protected void renderHeadline ( $block )
renderHr() protected method

protected void renderHr ( $block )
renderImage() protected method

protected void renderImage ( $block )
renderInlineCode() protected method

protected void renderInlineCode ( $block )
renderLabel() protected method

Renders a reference label

protected void renderLabel ( $block )
renderLink() protected method

protected void renderLink ( $block )
renderList() protected method

protected void renderList ( $block )
renderParagraph() protected method

Render a paragraph block

protected string renderParagraph ( $block )
renderQuote() protected method

protected void renderQuote ( $block )
renderStrong() protected method

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

protected void renderText ( $text )
renderUrl() protected method

protected void renderUrl ( $block )