jenkins-bot has submitted this change and it was merged.

Change subject: Improve math rendering
......................................................................


Improve math rendering

remove multinie nowiki tags and syntaxhighlight tags

Change-Id: I525182b71fa8aa5707650b83cfc13b5244a29013
---
M includes/MathIdGenerator.php
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/includes/MathIdGenerator.php b/includes/MathIdGenerator.php
index 0e546b5..cceb2de 100644
--- a/includes/MathIdGenerator.php
+++ b/includes/MathIdGenerator.php
@@ -43,9 +43,12 @@
         */
        public function __construct( $wikiText, $revisionId = 0 ) {
                $wikiText = Sanitizer::removeHTMLcomments( $wikiText );
-               $wikiText = preg_replace( '#<nowiki>(.*)</nowiki>#', '', 
$wikiText );
                $this->wikiText =
-                       Parser::extractTagsAndParams( [ 'math' ], $wikiText, 
$this->mathTags );
+                       Parser::extractTagsAndParams( [ 'nowki', 
'syntaxhighlight', 'math' ], $wikiText,
+                               $tags );
+               $this->mathTags = array_filter( $tags, function ( $v ) {
+                       return $v[0] === 'math';
+               } );
                $this->revisionId = $revisionId;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I525182b71fa8aa5707650b83cfc13b5244a29013
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Dyiop <[email protected]>
Gerrit-Reviewer: Hcohl <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Whyameri <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to