Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/190222

Change subject: Force Re-Rendering for empty svg images
......................................................................

Force Re-Rendering for empty svg images

Change-Id: Ia5a54fc84a95fd286822d60fb732dcf5244514e5
---
M FormulaInfo.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/22/190222/1

diff --git a/FormulaInfo.php b/FormulaInfo.php
index af1ce7d..0185ea0 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -193,6 +193,10 @@
                        $out->addHtml( '</div></div>' );
                }
                if( self::hasSvgSupport( $mode ) ){
+                       if ( $renderer->getSvg('cached') === '' ){
+                               $out->addWikiText('SVG image empty. Force 
Re-Rendering' );
+                               $renderer->render( true );
+                       }
                        $out->addWikiText( 'SVG (' . self::getlengh( 
$renderer->getSvg( 'render' ) ) . ') :',
                                FALSE );
                        $out->addHtml( $renderer->getSvg() ); // FALSE, 
'mwe-math-demo' ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/190222
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5a54fc84a95fd286822d60fb732dcf5244514e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <w...@physikerwelt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to