From ac59fdcefc7aaf3beb2fb1b90184f207a32f2c73 Mon Sep 17 00:00:00 2001 From: physikerwelt Date: Tue, 23 Feb 2016 21:36:39 +0100 Subject: [PATCH] Only use parallel rendering in MathML mode * It turned out that parallel rendering causes problems in the PNG rendering mode. * This change disables parallel rendering for all modes but MahtML for now. Bug: T127738 Change-Id: Ie0f7b391e89f53bac3490203e060c10c21d5e312 --- Math.hooks.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Math.hooks.php b/Math.hooks.php index 3a76d8a..fb9623f 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -184,9 +184,6 @@ class MathHooks { if ( trim( $content ) === '' ) { // bug 8372 return ''; } - $marker = Parser::MARKER_PREFIX . - '-postMath-' . sprintf( '%08X', $n ++ ) . - Parser::MARKER_SUFFIX; $mode = self::mathModeToString( $parser->getUser()->getOption( 'math' ) ); // Indicate that this page uses math. @@ -194,14 +191,17 @@ class MathHooks { $parser->getOptions()->optionUsed( 'math' ); $renderer = MathRenderer::getRenderer( $content, $attributes, $mode ); - self::$tags[$marker] = array( $renderer, $parser ); $parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) ); if ( $mode == 'mathml' ) { $parser->getOutput()->addModuleStyles( array( 'ext.math.desktop.styles' ) ); $parser->getOutput()->addModules( array( 'ext.math.scripts' ) ); + $marker = Parser::MARKER_PREFIX . + '-postMath-' . sprintf( '%08X', $n ++ ) . + Parser::MARKER_SUFFIX; + self::$tags[$marker] = array( $renderer, $parser ); + return $marker; } - return $marker; - + return self::mathPostTagHook( $renderer, $parser ); } /**