diff --git a/MathRenderer.php b/MathRenderer.php index c214a23..6784ff4 100644 --- a/MathRenderer.php +++ b/MathRenderer.php @@ -610,7 +610,7 @@ abstract class MathRenderer { // equation was already checked or checking is disabled return true; } else { - if( (int) $wgMathDisableTexFilter == MW_MATH_CHECK_NEW ){ + if( (int) $wgMathDisableTexFilter == MW_MATH_CHECK_NEW && $this->mode != MW_MATH_SOURCE ){ if( $this->readFromDatabase() ){ return true; } diff --git a/MathSource.php b/MathSource.php index 3ad43d6..95340ac 100644 --- a/MathSource.php +++ b/MathSource.php @@ -19,6 +19,15 @@ * @ingroup Parser */ class MathSource extends MathRenderer { + /** + * @param string $tex + * @param array $params + */ + function __construct( $tex = '', $params = array() ) { + parent::__construct( $tex, $params ); + $this->setMode( MW_MATH_SOURCE ); + } + /** * Renders TeX by outputting it to the browser in a span tag *