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:
parent
df31285e23
commit
fa8fb431e7
1 changed files with 3 additions and 4 deletions
|
|
@ -983,11 +983,10 @@ class LanguageConverter {
|
|||
* Wrap math into rawoutput -{R| math }- syntax.
|
||||
*/
|
||||
public function armourMath( $text ) {
|
||||
// we need to convert '-{' and '}-' to '-{' and '}-'
|
||||
// to avoid a unwanted '}-' appeared after the math-image.
|
||||
// convert '-{' and '}-' to '-{' and '}-' to prevent
|
||||
// any unwanted markup appearing in the math image tag.
|
||||
$text = strtr( $text, array( '-{' => '-{', '}-' => '}-' ) );
|
||||
$ret = "-{R|$text}-";
|
||||
return $ret;
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue