diff options
author | Arthur <arthur@hoa.ro> | 2016-03-01 12:15:22 +0100 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-03-01 12:15:22 +0100 |
commit | 40b25bef6a027b8e39975a84e8843a921ac1f607 (patch) | |
tree | a8e3a890a3d4f66a15260c56b01c8099516807c6 | |
parent | 6e7a3210c3ec2b70b748d513bbd5168a887bf0ea (diff) | |
parent | 841df2dd5512a77f8c0150bef8977010fdf0dc0c (diff) | |
download | Shaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.tar.gz Shaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.tar.zst Shaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.zip |
Merge pull request #506 from kalvn/master
Avoids populating a markdown empty container if there's no description.
-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 | } |