Wiki code tag should default to shell script - now it displays nothing
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Dec 2010 17:28:21 +0000 (10:28 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Dec 2010 17:28:29 +0000 (10:28 -0700)
wicked/lib/Text_Wiki/Render/Xhtml/Code2.php

index 600c191..b1fe0b1 100644 (file)
@@ -14,7 +14,10 @@ class Text_Wiki_Render_Xhtml_Code2 extends Text_Wiki_Render_Xhtml_Code
      */
     public function token($options)
     {
-        $type = $options['attr']['type'];
+        if (!($type = $options['attr']['type'])) {
+            // Default to shell script
+            $type = 'sh';
+        }
 
         $part = new Horde_Mime_Part();
         $part->setContents($options['text']);