Merge pull request #49 from ss23/master

Fix RebuildLuceneDocsIndex to use new Markdown parser
This commit is contained in:
Will Rossiter 2014-11-11 22:40:17 +13:00
commit 2656f244c7
5 changed files with 7 additions and 5 deletions

0
LICENSE Executable file → Normal file
View File

0
README.md Executable file → Normal file
View File

0
_config.php Executable file → Normal file
View File

View File

@ -21,7 +21,6 @@ class RebuildLuceneDocsIndex extends BuildTask {
} }
function rebuildIndexes($quiet = false) { function rebuildIndexes($quiet = false) {
require_once(DOCSVIEWER_PATH .'/thirdparty/markdown/markdown.php');
require_once 'Zend/Search/Lucene.php'; require_once 'Zend/Search/Lucene.php';
ini_set("memory_limit", -1); ini_set("memory_limit", -1);
@ -76,7 +75,10 @@ class RebuildLuceneDocsIndex extends BuildTask {
if(!is_dir($page->getPath())) { if(!is_dir($page->getPath())) {
$doc = new Zend_Search_Lucene_Document(); $doc = new Zend_Search_Lucene_Document();
$content = $page->getMarkdown(); $content = $page->getMarkdown();
if($content) $content = Markdown($content); if($content) {
$md = new ParsedownExtra();
$content = $md->text($content);
}
$entity = ($entity = $page->getEntity()) ? $entity->getTitle() : ""; $entity = ($entity = $page->getEntity()) ? $entity->getTitle() : "";