mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 01:10:09 +00:00
5245d0f555
Adds a new method isChanged() for determining if a value was changed. This is done in preparation for a more elaborated caching method that is handled inside the abstract base class. Change-Id: Ica15f77d96453d30edd3a117c7185c694ad3691e
37 lines
813 B
PHP
37 lines
813 B
PHP
<?php
|
|
/**
|
|
* MediaWiki math extension
|
|
*
|
|
* (c) 2002-2012 Tomasz Wegrzanowski, Brion Vibber, Moritz Schubotz and other MediaWiki contributors
|
|
* GPLv2 license; info in main package.
|
|
*
|
|
* Renderer for MathJax
|
|
* @file
|
|
*/
|
|
|
|
|
|
/**
|
|
* Takes LaTeX fragments and outputs the source directly to the browser
|
|
*
|
|
* @author Tomasz Wegrzanowski
|
|
* @author Brion Vibber
|
|
* @author Moritz Schubotz
|
|
* @ingroup Parser
|
|
*/
|
|
class MathMathJax extends MathRenderer {
|
|
function render() {
|
|
# No need to render or parse anything more!
|
|
# New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818)
|
|
return Xml::element( 'span',
|
|
$this->getAttributes(
|
|
'span',
|
|
array(
|
|
'class' => 'tex',
|
|
'dir' => 'ltr'
|
|
)
|
|
),
|
|
'$ ' . str_replace( "\n", " ", $this->getTex() ) . ' $'
|
|
);
|
|
}
|
|
}
|