equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 |
2 |
3 /* |
3 /* |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
5 * Version 1.1.6 (Caoineag beta 1) |
5 * Copyright (C) 2006-2009 Dan Fuhry |
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * |
6 * |
8 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
7 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
9 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
8 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
10 * |
9 * |
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
98 public function render($text) |
97 public function render($text) |
99 { |
98 { |
100 $parser_class = "Carpenter_Parse_" . ucwords($this->parser); |
99 $parser_class = "Carpenter_Parse_" . ucwords($this->parser); |
101 $renderer_class = "Carpenter_Render_" . ucwords($this->renderer); |
100 $renderer_class = "Carpenter_Render_" . ucwords($this->renderer); |
102 |
101 |
|
102 // empty? |
|
103 if ( trim($text) === '' ) |
|
104 return $text; |
|
105 |
103 // include files, if we haven't already |
106 // include files, if we haven't already |
104 if ( !class_exists($parser_class) ) |
107 if ( !class_exists($parser_class) ) |
105 { |
108 { |
106 require_once( ENANO_ROOT . "/includes/wikiengine/parse_{$this->parser}.php"); |
109 require_once( ENANO_ROOT . "/includes/wikiengine/parse_{$this->parser}.php"); |
107 } |
110 } |