Fix the bug when a math image was contained by an "<a>" tag, there will be extra markup -{R| and }-.

Since the -{ and }- has been escaped, the Raw (-{R|text}-) markup are no longer needed.
This commit is contained in:
Philip Tzou 2010-12-21 15:27:23 +00:00
parent df31285e23
commit fa8fb431e7

View 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;
}
/**