diff options
Diffstat (limited to 'app/class')
-rw-r--r-- | app/class/Config.php | 13 | ||||
-rw-r--r-- | app/class/Modelrender.php | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/class/Config.php b/app/class/Config.php index c7d1a78..5c5fe76 100644 --- a/app/class/Config.php +++ b/app/class/Config.php @@ -36,6 +36,9 @@ abstract class Config /** @var string|false $debug */ protected static $debug = false; + /** Database config */ + protected static $markdownhardwrap = true; + public const SECRET_KEY_MIN = 16; public const SECRET_KEY_MAX = 128; @@ -276,6 +279,11 @@ abstract class Config return self::$debug; } + public static function markdownhardwrap() + { + return self::$markdownhardwrap; + } + // __________________________________________ S E T ______________________________________ @@ -481,6 +489,11 @@ abstract class Config } } + public static function setmarkdownhardwrap($markdownhardwrap) + { + self::$markdownhardwrap = boolval($markdownhardwrap); + } + diff --git a/app/class/Modelrender.php b/app/class/Modelrender.php index fd8531a..b3ecb60 100644 --- a/app/class/Modelrender.php +++ b/app/class/Modelrender.php @@ -491,7 +491,7 @@ class Modelrender extends Modelpage // $fortin->header_id_func = function ($header) { // return preg_replace('/[^\w]/', '', strtolower($header)); // }; - $fortin->hard_wrap = true; + $fortin->hard_wrap = Config::markdownhardwrap(); $text = $fortin->transform($text); return $text; } |