mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 54b112f45b8ebd521309d23bbe7f46dc58db3f51
parent 15c9c375399469af4c4aa02b52be881d2d00e72c
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 29 May 2019 15:56:45 +0200

Updated Markdown extension, experimental

Diffstat:
Msystem/extensions/markdown.php | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/system/extensions/markdown.php b/system/extensions/markdown.php @@ -3917,9 +3917,13 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser { $level = strspn(str_replace(array(" ", "!["), "", $lines), "!"); $attr = " class=\"notice$level\""; } - ++$this->noticeLevel; - $output = "<div$attr>\n".$this->runBlockGamut($text)."\n</div>"; - --$this->noticeLevel; + if (!empty($text)) { + ++$this->noticeLevel; + $output = "<div$attr>\n".$this->runBlockGamut($text)."\n</div>"; + --$this->noticeLevel; + } else { + $output = "<div$attr></div>"; + } return "\n".$this->hashBlock($output)."\n\n"; }