Fix the bug when a math image was contained by an "<a>" tag, there will be extra...
authorPhilip Tzou <philip@users.mediawiki.org>
Tue, 21 Dec 2010 15:27:23 +0000 (15:27 +0000)
committerPhilip Tzou <philip@users.mediawiki.org>
Tue, 21 Dec 2010 15:27:23 +0000 (15:27 +0000)
Since the -{ and }- has been escaped, the Raw (-{R|text}-) markup are no longer needed.

languages/LanguageConverter.php

index 083874c..26923b6 100644 (file)
@@ -983,11 +983,10 @@ class LanguageConverter {
         * Wrap math into rawoutput -{R| math }- syntax.
         */
        public function armourMath( $text ) {
-               // we need to convert '-{' and '}-' to '-&#123;' and '&#125;-'
-               // to avoid a unwanted '}-' appeared after the math-image.
+               // convert '-{' and '}-' to '-&#123;' and '&#125;-' to prevent
+               // any unwanted markup appearing in the math image tag.
                $text = strtr( $text, array( '-{' => '-&#123;', '}-' => '&#125;-' ) );
-               $ret = "-{R|$text}-";
-               return $ret;
+               return $text;
        }
 
        /**