Markdown
API reference › yii › console › Markdown
A Markdown parser that enhances markdown for reading in console environments.
Based on cebe/markdown.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$escapeCharacters protected | array | These are “escapeable” characters. Default: ['\. | Markdown |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
renderCode() protected | Renders a code block. | Markdown |
renderEmph() protected | Renders empathized elements. | Markdown |
renderInlineCode() protected | Renders an inline code span `. | Markdown |
renderParagraph() protected | Render a paragraph block. | Markdown |
renderStrike() protected | Renders the strike through feature. | Markdown |
renderStrong() protected | Renders strong elements. | Markdown |
Property details
Section titled “Property details”$escapeCharacters
Section titled “$escapeCharacters ”protected array $escapeCharacters = ['\\', '`', '*', '_', '~']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.
Method details
Section titled “Method details”renderCode()
Section titled “renderCode() ”protected function renderCode(array $block): stringRenders a code block.
Parameters
| Parameter | Type | Description |
|---|---|---|
$block | array |
Returns
string
renderEmph()
Section titled “renderEmph() ”protected function renderEmph(array $element): stringRenders empathized elements.
Parameters
| Parameter | Type | Description |
|---|---|---|
$element | array |
Returns
string
renderInlineCode()
Section titled “renderInlineCode() ”protected function renderInlineCode(array $element): stringRenders an inline code span `.
Parameters
| Parameter | Type | Description |
|---|---|---|
$element | array |
Returns
string
renderParagraph()
Section titled “renderParagraph() ”protected function renderParagraph(array $block): stringRender a paragraph block.
Parameters
| Parameter | Type | Description |
|---|---|---|
$block | array |
Returns
string
renderStrike()
Section titled “renderStrike() ”protected function renderStrike(array $element): stringRenders the strike through feature.
Parameters
| Parameter | Type | Description |
|---|---|---|
$element | array |
Returns
string
renderStrong()
Section titled “renderStrong() ”protected function renderStrong(array $element): stringRenders strong elements.
Parameters
| Parameter | Type | Description |
|---|---|---|
$element | array |
Returns
string