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:
Derk-Jan Hartman 2012-03-25 21:03:24 +02:00
parent b9f87bb400
commit 0cea0bffb5

View file

@ -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