mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-19 09:54:07 +08:00
fix breaking changes in markdown for console and API
API is not finished. issue #5082
This commit is contained in:
@ -28,13 +28,13 @@ class IndexFileAnalyzer extends Markdown
|
||||
protected function renderHeadline($block)
|
||||
{
|
||||
if ($this->_chapter === 0) {
|
||||
$this->title = $block['content']; // TODO adjust implementation
|
||||
$this->title = $this->renderAbsy($block['content']);
|
||||
$this->introduction = '';
|
||||
$this->_chapter++;
|
||||
} else {
|
||||
$this->_chapter++;
|
||||
$this->_chapters[$this->_chapter] = [
|
||||
'headline' => $block['content'],
|
||||
'headline' => $this->renderAbsy($block['content']),
|
||||
'content' => [],
|
||||
];
|
||||
}
|
||||
@ -44,7 +44,7 @@ class IndexFileAnalyzer extends Markdown
|
||||
protected function renderParagraph($block)
|
||||
{
|
||||
if ($this->_chapter < 1) {
|
||||
$this->introduction .= implode("\n", $block['content']);
|
||||
$this->introduction .= $this->renderAbsy($block['content']);
|
||||
}
|
||||
return parent::renderParagraph($block);
|
||||
}
|
||||
@ -53,7 +53,7 @@ class IndexFileAnalyzer extends Markdown
|
||||
{
|
||||
if ($this->_chapter > 0) {
|
||||
foreach ($block['items'] as $item => $itemLines) {
|
||||
if (preg_match('~\[([^\]]+)\]\(([^\)]+)\)(.*)~', implode("\n", $itemLines), $matches)) {
|
||||
if (preg_match('~\[([^\]]+)\]\(([^\)]+)\)(.*)~', $this->renderAbsy($itemLines), $matches)) {
|
||||
$this->_chapters[$this->_chapter]['content'][] = [
|
||||
'headline' => $matches[1],
|
||||
'file' => $matches[2],
|
||||
|
Reference in New Issue
Block a user