Wiki engine: optimization for empty-text case
authorDan
Fri, 21 Aug 2009 15:37:43 -0400
changeset 1093 be48c0a49c7d
parent 1092 3b97242ada21
child 1094 121cf3bbd16e
Wiki engine: optimization for empty-text case
includes/wikiformat.php
--- a/includes/wikiformat.php	Fri Aug 21 15:37:23 2009 -0400
+++ b/includes/wikiformat.php	Fri Aug 21 15:37:43 2009 -0400
@@ -99,6 +99,10 @@
     $parser_class = "Carpenter_Parse_" . ucwords($this->parser);
     $renderer_class = "Carpenter_Render_" . ucwords($this->renderer);
     
+    // empty?
+    if ( trim($text) === '' )
+      return $text;
+    
     // include files, if we haven't already
     if ( !class_exists($parser_class) )
     {