includes/wikiengine/render_xhtml.php
changeset 1073 b19a9bcb6a45
parent 1044 ad6a22377507
child 1078 67a4c839c7e1
--- a/includes/wikiengine/render_xhtml.php	Tue Aug 04 15:02:00 2009 -0400
+++ b/includes/wikiengine/render_xhtml.php	Tue Aug 04 15:02:54 2009 -0400
@@ -21,7 +21,7 @@
     'italic' => '<em>\\1</em>',
     'underline' => '<span style="text-decoration: underline;">\\1</span>',
     'externalwithtext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\2</a>',
-    'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>',
+    'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>'
   );
   
   public function heading($text, $pieces)
@@ -60,7 +60,7 @@
           $itag = 'dd';
           break;
       }
-      $list = "<$btag>\n";
+      $list = "<_paragraph_bypass><$btag>\n";
       $spacing = '';
       $depth = 1;
       foreach ( $piece['items'] as $j => $item )
@@ -108,12 +108,21 @@
         $spacing = substr($spacing, 4);
         $depth--;
       }
-      $list .= "</$btag>\n";
+      $list .= "</$btag></_paragraph_bypass>\n";
       $text = str_replace(Carpenter::generate_token($i), $list, $text);
     }
     return $text;
   }
   
+  public function blockquote($text, $pieces)
+  {
+    foreach ( $pieces as $i => $piece )
+    {
+      $text = str_replace(Carpenter::generate_token($i), "<blockquote>\n" . nl2br($piece) . "\n</blockquote>\n", $text);
+    }
+    return $text;
+  }
+  
   public function paragraph($text, $pieces)
   {
     foreach ( $pieces as $i => $piece )