Mobrovac has submitted this change and it was merged.

Change subject: Use TeX representation for the editsection title
......................................................................


Use TeX representation for the editsection title

Bug: T103269
Change-Id: I9ccb6653048e8d3c4574776690fab5574cb7030b
---
M Math.hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Mobrovac: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Math.hooks.php b/Math.hooks.php
index fb9623f..8b250e3 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -385,6 +385,10 @@
                MathRestbaseInterface::batchEvaluate( $rbis );
                foreach ( self::$tags as $key => $tag ){
                        $value = call_user_func_array( array( 
"MathHooks","mathPostTagHook" ), $tag );
+                       // Workaround for 
https://phabricator.wikimedia.org/T103269
+                       $text = preg_replace( '/(<mw:editsection[^>]*>.*?)' . 
preg_quote( $key ) .
+                               '(.*?)<\/mw:editsection>/',
+                               '\1 $' . htmlspecialchars( $tag[0]->getTex() ) 
. '\2</mw:editsection>', $text );
                        $text = str_replace( $key, $value, $text );
                }
                // This hook might be called multiple times. However one the 
tags are rendered the job is done.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ccb6653048e8d3c4574776690fab5574cb7030b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Inyono <[email protected]>
Gerrit-Reviewer: Jakob <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to