From b7bd5196f265fd04ecc639d2bda6f332a770edc8 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 9 Oct 2014 11:09:57 -0700 Subject: [PATCH] Fix style stripping by adding missing /g flag Change-Id: I6cd4b853638010d60809cecc87499113bd189d4c --- MathMathML.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MathMathML.php b/MathMathML.php index 0b39cfe..b7afae3 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -349,7 +349,7 @@ class MathMathML extends MathRenderer { $style .= " ".$styles[1]; // merge styles if ( $this->getMathStyle() === MW_MATHSTYLE_DISPLAY ) { // TODO: Improve style cleaning - $style = preg_replace( '/margin\-(left|right)\:\s*\d+(\%|in|cm|mm|em|ex|pt|pc|px)\;|position:\s*absolute;\s*left:\s*0px;/', '', $style ); + $style = preg_replace( '/margin\-(left|right)\:\s*\d+(\%|in|cm|mm|em|ex|pt|pc|px)\;|position:\s*absolute;\s*left:\s*0px;/g', '', $style ); } } // TODO: Figure out if there is a way to construct