Class cebe\markdown\MarkdownExtra
Markdown parser for the markdown extra flavor.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$codeAttributesOnPre | bool | Whether special attributes on code blocks should be applied on the <pre> element. |
cebe\markdown\MarkdownExtra |
$html5 | boolean | Whether to format markup according to HTML5 spec. | cebe\markdown\Markdown |
$keepListStartNumber | bool | Enable support start attribute of ordered lists. |
cebe\markdown\block\ListTrait |
$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 | cebe\markdown\MarkdownExtra | ||
$inlineHtmlElements | array | HTML elements considered as inline elements. | cebe\markdown\block\HtmlTrait |
$references | array | A list of defined references in this document. | cebe\markdown\inline\LinkTrait |
$selfClosingHtmlElements | array | HTML elements known to be self-closing. | cebe\markdown\block\HtmlTrait |
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
Whether special attributes on code blocks should be applied on the <pre>
element.
The default behavior is to put them on the <code>
element.
protected $escapeCharacters = ['\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '#', '+', '-', '.', '!', '<', '>', ':', '|']
Method Details
Consume lines for a fenced code block
protected void consumeFencedCode ( $lines, $current ) | ||
$lines | ||
$current |
Consume link references
protected void consumeReference ( $lines, $current ) | ||
$lines | ||
$current |
protected void identifyReference ( $line ) | ||
$line |
protected void parseInline ( $text ) | ||
$text |
protected void parseSpecialAttributes ( $text ) | ||
$text |
protected void renderAttributes ( $block ) | ||
$block |
protected void renderCode ( $block ) | ||
$block |
Renders a headline
protected void renderHeadline ( $block ) | ||
$block |
protected void renderImage ( $block ) | ||
$block |
protected void renderLink ( $block ) | ||
$block |
protected void renderSpecialAttributes ( $block ) | ||
$block |