mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-14 11:15:13 +00:00
Let the html output of our tex and mathjax mode inherit attributes such as style.
Required in order to fix bug 35191 Change-Id: Ia267aa211cb1bcb2023cd3f87bbc83c983ffc91f
This commit is contained in:
parent
b9f87bb400
commit
0cea0bffb5
|
@ -60,7 +60,16 @@ class MathRenderer {
|
||||||
if( $this->mode == MW_MATH_SOURCE || $this->mode == MW_MATH_MATHJAX ) {
|
if( $this->mode == MW_MATH_SOURCE || $this->mode == MW_MATH_MATHJAX ) {
|
||||||
# No need to render or parse anything more!
|
# No need to render or parse anything more!
|
||||||
# New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818)
|
# New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818)
|
||||||
return ('<span class="tex" dir="ltr">$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $</span>');
|
return Xml::element( 'span',
|
||||||
|
$this->_attribs(
|
||||||
|
'span',
|
||||||
|
array(
|
||||||
|
'class' => 'tex',
|
||||||
|
'dir' => 'ltr'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if( $this->tex == '' ) {
|
if( $this->tex == '' ) {
|
||||||
return; # bug 8372
|
return; # bug 8372
|
||||||
|
|
Loading…
Reference in a new issue