Physikerwelt has submitted this change and it was merged. Change subject: Adjust MathDebug to lastes Math dev version ......................................................................
Adjust MathDebug to lastes Math dev version Change-Id: I0118ae3b3a4204c86c035596db03563feccd7ee9 --- A .gitattributes M README M SpecialMathDebug.php M SpecialMathIndex.php R maintenance/UpdateMath.php 5 files changed, 19 insertions(+), 5 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5a43e73 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text eol=lf +*.png binary +*.ico binary +*.ppk binary diff --git a/README b/README index 7005d47..366239b 100644 --- a/README +++ b/README @@ -1 +1,5 @@ -The documentation is coming soon. +Requires: +-MWSearch +-MathWebSearch + + diff --git a/SpecialMathDebug.php b/SpecialMathDebug.php index 6bad8c9..4434cd9 100644 --- a/SpecialMathDebug.php +++ b/SpecialMathDebug.php @@ -111,7 +111,7 @@ global $wgUseMathJax, $wgUseLaTeXML, $wgTexvc; $out = $this->getOutput(); $out->addModules( array( 'ext.math.mathjax.enabler' ) ); - $out->addModules( array( 'ext.math.mathjax.enabler.mml' ) ); + //$out->addModules( array( 'ext.math.mathjax.enabler.mml' ) ); // die('END'); $i = 0; foreach ( array_slice( self::getMathTagsFromPage( $page ), $offset, $length, true ) as $key => $t ) { @@ -128,7 +128,7 @@ if ( $wgUseMathJax && $wgUseMathJax) { $out->addHTML( self::render( $t, '7+', false ) ); //TODO: Update the name } - + } } @@ -159,7 +159,7 @@ $out->addWikiText( '<source>' . $tstring . '<\source>' ); return true; } - private static function render( $t, $mode, $aimJax = true ) { + private static function render( $t, $mode, $aimJax = true ) { $modeInt= (int) substr($mode, 0,1); $renderer = MathRenderer::getRenderer( $t, array(), $modeInt ); $renderer->setPurge( true ); @@ -177,6 +177,8 @@ } private static function aimHTMLFromJax( &$s ) { $s = str_replace( 'class="tex"', 'class="-NO-JAX-"', $s ); + $s = str_replace( 'class="MathJax_Preview"', 'class="-NO-JAX-"', $s ); + $s = preg_replace('|<script type="math/mml">(.*)</script>|', '', $s); return $s; } diff --git a/SpecialMathIndex.php b/SpecialMathIndex.php index 1398e6b..de8f1f3 100644 --- a/SpecialMathIndex.php +++ b/SpecialMathIndex.php @@ -32,7 +32,11 @@ } function testIndex() { $out = $this->getOutput(); -// $out->addWikiText($text) + $out->addWikiText('This is a test.'); + require_once dirname( __FILE__ ) .'/maintenance/UpdateMath.php'; + $updater = new UpdateMath(); + $updater->loadParamsAndArgs(null, array("max"=>2), null); + $updater->execute(); } diff --git a/maintenance/ReRenderMath.php b/maintenance/UpdateMath.php similarity index 100% rename from maintenance/ReRenderMath.php rename to maintenance/UpdateMath.php -- To view, visit https://gerrit.wikimedia.org/r/83200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0118ae3b3a4204c86c035596db03563feccd7ee9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt <w...@physikerwelt.de> Gerrit-Reviewer: Physikerwelt <w...@physikerwelt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits