mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Merge pull request #49 from ss23/master
Fix RebuildLuceneDocsIndex to use new Markdown parser
This commit is contained in:
commit
2656f244c7
0
_config.php
Executable file → Normal file
0
_config.php
Executable file → Normal file
@ -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() : "";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user