mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Fix RebuildLuceneDocsIndex to use new Markdown parser
Previously, it was attempting to use the already removed Markdown class. Also some minor permission / indentation fixes.
This commit is contained in:
parent
e162891989
commit
ab3e3f392a
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