diff -r dc8741857bde -r 4d87aad3c4c0 includes/wikiengine/Parse/Mediawiki/Paragraph.php --- a/includes/wikiengine/Parse/Mediawiki/Paragraph.php Thu Jun 28 15:26:40 2007 -0400 +++ b/includes/wikiengine/Parse/Mediawiki/Paragraph.php Sun Jul 01 14:08:39 2007 -0400 @@ -56,7 +56,8 @@ 'deflist', 'table', 'list', - 'toc' + 'toc', + 'pre' ) ); @@ -142,5 +143,37 @@ return $start . trim($matches[0]) . $end; } } + + /** + * + * Abstrct method to parse source text for matches. + * + * Applies the rule's regular expression to the source text, passes + * every match to the process() method, and replaces the matched text + * with the results of the processing. + * + * @access public + * + * @see Text_Wiki_Parse::process() + * + */ + + function parse() + { + $source =& $this->wiki->source; + $source = wikiformat_process_block($source); + + $source = preg_replace('/(.*?)<\/litewiki>([\s]+?|$)/is', '\\1\\2', $source); + + // die('
' . htmlspecialchars($source) . '
'); + + $this->wiki->source = preg_replace_callback( + $this->regex, + array(&$this, 'process'), + $this->wiki->source + ); + + $source = preg_replace('/(.*?)<\/litewiki>/is', '\\1', $source); + } } ?> \ No newline at end of file