⭐ 0 follower

クラス yii\console\Markdown

全てのクラス All Classes | プロパティ Properties | メソッド Methods
継承yii\console\Markdown » cebe\markdown\Parser
使用するトレイトcebe\markdown\block\FencedCodeTrait, cebe\markdown\inline\CodeTrait, cebe\markdown\inline\EmphStrongTrait, cebe\markdown\inline\StrikeoutTrait
利用可能バージョン2.0
ソースコード https://github.com/yiisoft/yii2/blob/master/framework/console/Markdown.php

コンソール環境での読みやすさを向上させたMarkdownパーサーです。

cebe/markdownに基づいています。

保護されたプロパティ

継承されたプロパティを非表示

プロパティ 説明 定義元

保護されたメソッド

継承されたメソッドを非表示

メソッド 説明 定義元
renderCode() コードブロックをレンダリングします。 yii\console\Markdown
renderEmph() 強調表示された要素をレンダリングします。 yii\console\Markdown
renderInlineCode() インラインコードスパン(`)をレンダリングします。 yii\console\Markdown
renderParagraph() 段落ブロックをレンダリングします。 yii\console\Markdown
renderStrike() 取り消し線をレンダリングします。 yii\console\Markdown
renderStrong() 強調表示された要素をレンダリングします。 yii\console\Markdown

プロパティの詳細

継承されたプロパティを非表示

# GitHubで編集 GitHubでソースを見る $escapeCharacters protected property

これらは「エスケープ可能な」文字です。これらのいずれかをバックスラッシュを前に付けて使用すると、その文字はバックスラッシュなしで出力され、Markdownとして解釈されません。

protected array $escapeCharacters = [ '\\', '`', '*', '_', '~', ];

メソッドの詳細

継承されたメソッドを非表示

# GitHubで編集 GitHubでソースを見る renderCode() protected method

コードブロックをレンダリングします。

protected string renderCode ($block)
$block array

                protected function renderCode($block)
{
    return Console::ansiFormat($block['content'], [Console::NEGATIVE]) . "\n\n";
}

            
# GitHubで編集 GitHubでソースを見る renderEmph() protected method

強調表示された要素をレンダリングします。

protected string renderEmph ($element)
$element array

                protected function renderEmph($element)
{
    return Console::ansiFormat($this->renderAbsy($element[1]), [Console::ITALIC]);
}

            
# GitHubで編集 GitHubでソースを見る renderInlineCode() protected method

インラインコードスパン(`)をレンダリングします。

protected string renderInlineCode ($element)
$element array

                protected function renderInlineCode($element)
{
    return Console::ansiFormat($element[1], [Console::UNDERLINE]);
}

            
# GitHubで編集 GitHubでソースを見る renderParagraph() protected method

段落ブロックをレンダリングします。

protected string renderParagraph ($block)
$block string

                protected function renderParagraph($block)
{
    return rtrim($this->renderAbsy($block['content'])) . "\n\n";
}

            
renderStrike() protectedメソッド

取り消し線をレンダリングします。

protected string renderStrike ( $element )
$element array

                protected function renderStrike($element)
{
    return Console::ansiFormat($this->parseInline($this->renderAbsy($element[1])), [Console::CROSSED_OUT]);
}

            
renderStrong() protectedメソッド

強調表示された要素をレンダリングします。

protected string renderStrong ( $element )
$element array

                protected function renderStrong($element)
{
    return Console::ansiFormat($this->renderAbsy($element[1]), [Console::BOLD]);
}