diff options
author | kalvn <kalvnthereal@gmail.com> | 2016-02-28 18:24:30 +0100 |
---|---|---|
committer | kalvn <kalvnthereal@gmail.com> | 2016-02-28 18:24:30 +0100 |
commit | 841df2dd5512a77f8c0150bef8977010fdf0dc0c (patch) | |
tree | 34245b3efc1f8f395131343860c650ed2e9022e6 /plugins/markdown | |
parent | 8710d4da8e21b31a90bdcaed10521e0b937cf6c2 (diff) | |
download | Shaarli-841df2dd5512a77f8c0150bef8977010fdf0dc0c.tar.gz Shaarli-841df2dd5512a77f8c0150bef8977010fdf0dc0c.tar.zst Shaarli-841df2dd5512a77f8c0150bef8977010fdf0dc0c.zip |
Avoids populating a markdown empty container if there's no description.
Diffstat (limited to 'plugins/markdown')
-rw-r--r-- | plugins/markdown/markdown.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php index a45b6574..5a702c7b 100644 --- a/plugins/markdown/markdown.php +++ b/plugins/markdown/markdown.php | |||
@@ -173,7 +173,10 @@ function process_markdown($description) | |||
173 | ->setBreaksEnabled(true) | 173 | ->setBreaksEnabled(true) |
174 | ->text($processedDescription); | 174 | ->text($processedDescription); |
175 | $processedDescription = sanitize_html($processedDescription); | 175 | $processedDescription = sanitize_html($processedDescription); |
176 | $processedDescription = '<div class="markdown">'. $processedDescription . '</div>'; | 176 | |
177 | if(!empty($processedDescription)){ | ||
178 | $processedDescription = '<div class="markdown">'. $processedDescription . '</div>'; | ||
179 | } | ||
177 | 180 | ||
178 | return $processedDescription; | 181 | return $processedDescription; |
179 | } | 182 | } |