aboutsummaryrefslogtreecommitdiffstats
path: root/include/markdown.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/markdown.php')
-rw-r--r--include/markdown.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/markdown.php b/include/markdown.php
index a0e07ba68..7fba1259f 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -66,7 +66,10 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
$s = MarkdownExtra::defaultTransform($s);
- if($options && $options['preserve_lf']) {
+
+ $preserve_lf = $options['preserve_lf'] ?? false;
+
+ if($preserve_lf) {
$s = str_replace(["\r","\n"],["",'<br>'],$s);
}
else {