From 3c62a7206ecf5266e4b9d6714e5d56f6f27bd88c Mon Sep 17 00:00:00 2001
From: Hypolite Petovan
Date: Mon, 4 Feb 2019 21:46:34 -0500
Subject: [PATCH 1/2] Improve Markdown::convert panel display in mod/babel
---
mod/babel.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mod/babel.php b/mod/babel.php
index 6e47b8108..51bbf7c8a 100644
--- a/mod/babel.php
+++ b/mod/babel.php
@@ -98,7 +98,7 @@ function babel_content()
$html = Text\Markdown::convert($markdown);
$results[] = [
'title' => L10n::t('Markdown::convert (raw HTML)'),
- 'content' => htmlspecialchars($html)
+ 'content' => visible_whitespace(htmlspecialchars($html))
];
$results[] = [
From a96e9f248eca1576c99681ff22cd861ff8a7c814 Mon Sep 17 00:00:00 2001
From: Hypolite Petovan
Date: Mon, 4 Feb 2019 21:49:55 -0500
Subject: [PATCH 2/2] Remove asterisk provision altogether in
Markdown::toBBCode
---
src/Content/Text/Markdown.php | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/Content/Text/Markdown.php b/src/Content/Text/Markdown.php
index 977ecd304..ceb5b043b 100644
--- a/src/Content/Text/Markdown.php
+++ b/src/Content/Text/Markdown.php
@@ -83,9 +83,6 @@ class Markdown extends BaseObject
{
$s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
- // Replace lonely stars in lines not starting with it with literal stars
- $s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s);
-
// The parser cannot handle paragraphs correctly
$s = str_replace(['
', '', '
'], ['
', '
', '
'], $s);