mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-27 17:01:07 +00:00
MathJax must not process every <strong class="error">
Many things in MediaWiki (and various on-wiki templates, at least on enwiki) output error messages wrapped in <strong class="error">. MathJax parsing all of these (added in I1199cb34) is completely broken. What appears to have been intended is that MathJax would parse the errors output by MathRenderer.php. So let's add a "texerror" class to those and have MathJax look for that class instead. Bug: 55675 Change-Id: Iaa6c3a892af463f38e6706f9407c6dcb948fe670
This commit is contained in:
parent
cf8cbfd44b
commit
2b8534793f
|
@ -120,7 +120,7 @@ abstract class MathRenderer {
|
|||
array_shift( $parameters );
|
||||
$errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped();
|
||||
$source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) );
|
||||
return "<strong class='error'>$mf($errmsg): $source</strong>\n";
|
||||
return "<strong class='error texerror'>$mf($errmsg): $source</strong>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
2
modules/MathJax/extensions/wiki2jax.js
vendored
2
modules/MathJax/extensions/wiki2jax.js
vendored
|
@ -20,7 +20,7 @@ MathJax.Extension.wiki2jax = {
|
|||
this.configured = true;
|
||||
}
|
||||
var that = this;
|
||||
$('span.tex, img.tex, strong.error', element || document).each(function(i, span) {
|
||||
$('span.tex, img.tex, strong.texerror', element || document).each(function(i, span) {
|
||||
that.ConvertMath(span);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue