/** * Transform the text of a page, and return a parse tree. */ function TransformTextPre($text, $markup = 2.0, $basepage = false) { if (isa($text, 'WikiDB_PageRevision')) { $rev = $text; $text = $rev->getPackedContent(); $markup = $rev->get('markup'); } // NEW: default markup is new, to increase stability if (!empty($markup) && $markup < 2.0) { $text = ConvertOldMarkup($text); } // Expand leading tabs. $text = expand_tabs($text); //set_time_limit(3); $output = new WikiText($text); return $output; }
function _transform(&$text) { include_once 'lib/BlockParser.php'; // Expand leading tabs. $text = expand_tabs($text); $input = new BlockParser_Input($text); $output = $this->ParsedBlock($input); return new XmlContent($output->getContent()); }