fix breaking changes in markdown for console and API

API is not finished.

issue #5082
This commit is contained in:
Carsten Brandt
2014-10-10 19:39:32 +02:00
parent b66c4cf42d
commit 3e3948d8ea
9 changed files with 78 additions and 171 deletions

View File

@ -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],