diff -r ac1ecaacb48e -r ad6a22377507 includes/render.php --- a/includes/render.php Wed Jul 08 18:51:48 2009 -0400 +++ b/includes/render.php Wed Jul 08 18:52:41 2009 -0400 @@ -193,47 +193,41 @@ // this is still needed by parser plugins $random_id = md5( time() . mt_rand() ); - // Strip out sections and PHP code - + // Strip out sections self::nowiki_strip($text, $nowiki_stripped); + // Run early parsing plugins $code = $plugins->setHook('render_wikiformat_veryearly'); foreach ( $code as $cmd ) { eval($cmd); } + // Strip out embedded PHP self::php_strip($text, $php_stripped); + // Perform render through the engine $carpenter = new Carpenter(); $carpenter->flags = $flags; $carpenter->hook(array(__CLASS__, 'hook_pre'), PO_AFTER, 'lang'); $carpenter->hook(array(__CLASS__, 'hook_posttemplates'), PO_AFTER, 'templates'); if ( $flags & RENDER_WIKI_TEMPLATE ) { - // FIXME: process noinclude/nodisplay + // FIXME: Where is noinclude/nodisplay being processed in the pipeline? (Seems to be processed, but not here) } $text = $carpenter->render($text); // For plugin compat $result =& $text; + // Post processing hook $code = $plugins->setHook('render_wikiformat_post'); foreach ( $code as $cmd ) { eval($cmd); } - /* - $text = preg_replace('/(.*?)<\/noinclude>/is', '\\1', $text); - if ( $paths->namespace == 'Template' ) - { - $text = preg_replace('/(.*?)<\/nodisplay>/is', '', $text); - } - - $text = process_tables($text); - */ - + // Add PHP and nowiki back in self::nowiki_unstrip($text, $nowiki_stripped); self::php_unstrip($text, $php_stripped);