summaryrefslogtreecommitdiffstats
path: root/application/controllers/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/file.php')
-rw-r--r--application/controllers/file.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 7c49988bf..79d5395ae 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -320,14 +320,16 @@ class File extends MY_Controller {
echo '<div class="code content table markdownrender">'."\n";
echo '<div class="table-row">'."\n";
echo '<div class="table-cell">'."\n";
- // TODO: use exec safe and catch exception
- $r = (new \libraries\ProcRunner(array(FCPATH.'scripts/Markdown.pl', $file)))->forbid_stderr()->exec();
- echo $r['stdout'];
+
+ require_once(APPPATH."/third_party/parsedown/Parsedown.php");
+ $parsedown = new Parsedown();
+ echo $parsedown->text(file_get_contents($file));
+
echo '</div></div></div>';
return array(
"output" => ob_get_clean(),
- "return_value" => $r["return_code"],
+ "return_value" => 0,
);
} else {
return get_instance()->_colorify($file, $lexer, $is_multipaste ? $filedata["id"] : false);