From ab3e3f392a1c2b944e3eb60bfbe0fb0e43c8a5e1 Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Tue, 11 Nov 2014 20:44:50 +1300 Subject: [PATCH] Fix RebuildLuceneDocsIndex to use new Markdown parser Previously, it was attempting to use the already removed Markdown class. Also some minor permission / indentation fixes. --- LICENSE | 0 README.md | 0 _config.php | 0 code/tasks/RebuildLuceneDocsIndex.php | 8 +++++--- composer.json | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) mode change 100755 => 100644 LICENSE mode change 100755 => 100644 README.md mode change 100755 => 100644 _config.php diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/_config.php b/_config.php old mode 100755 new mode 100644 diff --git a/code/tasks/RebuildLuceneDocsIndex.php b/code/tasks/RebuildLuceneDocsIndex.php index 6a84f57..1a25544 100755 --- a/code/tasks/RebuildLuceneDocsIndex.php +++ b/code/tasks/RebuildLuceneDocsIndex.php @@ -21,7 +21,6 @@ class RebuildLuceneDocsIndex extends BuildTask { } function rebuildIndexes($quiet = false) { - require_once(DOCSVIEWER_PATH .'/thirdparty/markdown/markdown.php'); require_once 'Zend/Search/Lucene.php'; ini_set("memory_limit", -1); @@ -76,7 +75,10 @@ class RebuildLuceneDocsIndex extends BuildTask { if(!is_dir($page->getPath())) { $doc = new Zend_Search_Lucene_Document(); $content = $page->getMarkdown(); - if($content) $content = Markdown($content); + if($content) { + $md = new ParsedownExtra(); + $content = $md->text($content); + } $entity = ($entity = $page->getEntity()) ? $entity->getTitle() : ""; @@ -121,4 +123,4 @@ class RebuildLuceneDocusIndex_Hourly extends HourlyTask { $reindex->rebuildIndexes(true); } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index 7c3ff5d..032dae4 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,6 @@ "erusev/parsedown-extra": "0.1.0" }, "suggest": { - "silverstripe/staticpublisher": "Allows publishing documentation as HTML" - } + "silverstripe/staticpublisher": "Allows publishing documentation as HTML" + } }