From d6774a94d223f0e87a9f0aab02f4de05deada86f Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Tue, 22 Sep 2020 22:18:33 +0200 Subject: Get php-markdown via composer --- ratatoeskr/sys/textprocessors.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ratatoeskr/sys/textprocessors.php') diff --git a/ratatoeskr/sys/textprocessors.php b/ratatoeskr/sys/textprocessors.php index 7ff3bbb..f195ef7 100644 --- a/ratatoeskr/sys/textprocessors.php +++ b/ratatoeskr/sys/textprocessors.php @@ -9,7 +9,8 @@ * See "ratatoeskr/licenses/ratatoeskr" for more information. */ -require_once(dirname(__FILE__) . "/../libs/markdown.php"); +use Michelf\Markdown; + require_once(dirname(__FILE__) . "/utils.php"); /* @@ -70,7 +71,7 @@ function textprocessor_apply_translation($translationobj) if (!isset($textprocessors)) { $textprocessors = [ - "Markdown" => ["Markdown", true], + "Markdown" => [Closure::fromCallable([Markdown::class, "defaultTransform"]), true], "Plain Text" => [function ($text) { return str_replace(["\r\n", "\n"], ["
", "
"], htmlesc($text)); }, true], -- cgit v1.2.3-70-g09d2