--- 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>(.*?)<\/litewiki>([\s]+?|$)/is', '<litewiki>\\1\\2</litewiki>', $source);
+
+ // die('<pre>' . htmlspecialchars($source) . '</pre>');
+
+ $this->wiki->source = preg_replace_callback(
+ $this->regex,
+ array(&$this, 'process'),
+ $this->wiki->source
+ );
+
+ $source = preg_replace('/<litewiki>(.*?)<\/litewiki>/is', '\\1', $source);
+ }
}
?>
\ No newline at end of file