]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #506 from kalvn/master
authorArthur <arthur@hoa.ro>
Tue, 1 Mar 2016 11:15:22 +0000 (12:15 +0100)
committerArthur <arthur@hoa.ro>
Tue, 1 Mar 2016 11:15:22 +0000 (12:15 +0100)
Avoids populating a markdown empty container if there's no description.

plugins/markdown/markdown.php

index a45b6574c1888d8470933022eaaa4868ce924f7d..5a702c7b5df8a639c6b41257ae3d152167352cf8 100644 (file)
@@ -173,7 +173,10 @@ function process_markdown($description)
         ->setBreaksEnabled(true)
         ->text($processedDescription);
     $processedDescription = sanitize_html($processedDescription);
-    $processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
+
+    if(!empty($processedDescription)){
+        $processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
+    }
 
     return $processedDescription;
 }