mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-29 13:57:50 +08:00
@@ -52,16 +52,17 @@ class IndexFileAnalyzer extends Markdown
|
|||||||
protected function renderList($block)
|
protected function renderList($block)
|
||||||
{
|
{
|
||||||
if ($this->_chapter > 0) {
|
if ($this->_chapter > 0) {
|
||||||
foreach ($block['items'] as $item => $itemLines) {
|
foreach ($block['items'] as $item => $absyElements) {
|
||||||
if (preg_match('~\[([^\]]+)\]\(([^\)]+)\)(.*)~', $this->renderAbsy($itemLines), $matches)) {
|
foreach($absyElements as $element) {
|
||||||
|
if ($element[0] === 'link') {
|
||||||
$this->_chapters[$this->_chapter]['content'][] = [
|
$this->_chapters[$this->_chapter]['content'][] = [
|
||||||
'headline' => $matches[1],
|
'headline' => $this->renderAbsy($element['text']),
|
||||||
'file' => $matches[2],
|
'file' => $element['url'],
|
||||||
'teaser' => $matches[3],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return parent::renderList($block);
|
return parent::renderList($block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user