From 5ac1d67a6937906c6f22b17f21627eb6ced1bc2c Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Fri, 10 Oct 2014 22:37:45 +0200 Subject: [PATCH] fix guide navigation issue #5082 --- extensions/apidoc/helpers/IndexFileAnalyzer.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions/apidoc/helpers/IndexFileAnalyzer.php b/extensions/apidoc/helpers/IndexFileAnalyzer.php index c4ce24275c..6a69535e43 100644 --- a/extensions/apidoc/helpers/IndexFileAnalyzer.php +++ b/extensions/apidoc/helpers/IndexFileAnalyzer.php @@ -52,13 +52,14 @@ class IndexFileAnalyzer extends Markdown protected function renderList($block) { if ($this->_chapter > 0) { - foreach ($block['items'] as $item => $itemLines) { - if (preg_match('~\[([^\]]+)\]\(([^\)]+)\)(.*)~', $this->renderAbsy($itemLines), $matches)) { - $this->_chapters[$this->_chapter]['content'][] = [ - 'headline' => $matches[1], - 'file' => $matches[2], - 'teaser' => $matches[3], - ]; + foreach ($block['items'] as $item => $absyElements) { + foreach($absyElements as $element) { + if ($element[0] === 'link') { + $this->_chapters[$this->_chapter]['content'][] = [ + 'headline' => $this->renderAbsy($element['text']), + 'file' => $element['url'], + ]; + } } } }