]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Avoids populating a markdown empty container if there's no description. 506/head
authorkalvn <kalvnthereal@gmail.com>
Sun, 28 Feb 2016 17:24:30 +0000 (18:24 +0100)
committerkalvn <kalvnthereal@gmail.com>
Sun, 28 Feb 2016 17:24:30 +0000 (18:24 +0100)
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;
 }