diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-09-22 22:18:33 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-09-22 22:18:33 +0200 |
commit | d6774a94d223f0e87a9f0aab02f4de05deada86f (patch) | |
tree | fa92604a7671f57b16ee59f540af8868a44d16a3 /ratatoeskr | |
parent | dc6f7089c053a4f96e713bdf0043f5c08dbae447 (diff) | |
download | ratatoeskr-cms-d6774a94d223f0e87a9f0aab02f4de05deada86f.tar.gz ratatoeskr-cms-d6774a94d223f0e87a9f0aab02f4de05deada86f.tar.bz2 ratatoeskr-cms-d6774a94d223f0e87a9f0aab02f4de05deada86f.zip |
Get php-markdown via composer
Diffstat (limited to 'ratatoeskr')
-rw-r--r-- | ratatoeskr/libs/INFO | 10 | ||||
-rw-r--r-- | ratatoeskr/sys/textprocessors.php | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/ratatoeskr/libs/INFO b/ratatoeskr/libs/INFO index 80a47e3..f1ef415 100644 --- a/ratatoeskr/libs/INFO +++ b/ratatoeskr/libs/INFO @@ -1,18 +1,12 @@ This directory will hold some libraries Ratatöskr needs. -1. PHP Markdown - - Place "markdown.php" from the archive directly into this directory. - - PHP Markdown can be found here: <http://michelf.com/projects/php-markdown/> - -2. kses +1. kses Place "kses.php" from the archive directly into this directory. kses can be found at <http://sourceforge.net/projects/kses/> -3. jQuery +2. jQuery Place jquery.min.js into this folder. 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"], ["<br />", "<br />"], htmlesc($text)); }, true], |