Class cebe\markdown\latex\Markdown
Markdown parser for the initial markdown spec.
Public Properties
Property | Type | Description | Defined 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
Property | Type | Description | Defined 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
Method | Description | Defined 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
Property Details
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 = ['\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '#', '+', '-', '.', '!', '<', '>']
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.
Method Details
Consume lines for a paragraph
Allow headlines and code to break paragraphs
protected void consumeParagraph ( $lines, $current ) | ||
$lines | ||
$current |
Escape special LaTeX characters
protected void escapeLatex ( $string ) | ||
$string |
Escape special characters in URLs
protected void escapeUrl ( $string ) | ||
$string |
This method will be called before parse()
and parseParagraph()
.
You can override it to do some initialization work.
protected void prepare ( ) |
protected void renderCode ( $block ) | ||
$block |
protected void renderEmail ( $block ) | ||
$block |
protected void renderEmph ( $block ) | ||
$block |
protected void renderHeadline ( $block ) | ||
$block |
protected void renderHr ( $block ) | ||
$block |
protected void renderImage ( $block ) | ||
$block |
protected void renderInlineCode ( $block ) | ||
$block |
Renders a reference label
protected void renderLabel ( $block ) | ||
$block |
protected void renderLink ( $block ) | ||
$block |
protected void renderList ( $block ) | ||
$block |
Render a paragraph block
protected string renderParagraph ( $block ) | ||
$block |
protected void renderQuote ( $block ) | ||
$block |
protected void renderStrong ( $block ) | ||
$block |
protected void renderText ( $text ) | ||
$text |
protected void renderUrl ( $block ) | ||
$block |