Merge "rdbms: make LBFactory "cliMode" check for phpdbg"
[lhc/web/wiklou.git] / includes / parser / MWTidy.php
index 5e54615..330859d 100644 (file)
@@ -69,7 +69,7 @@ class MWTidy {
                if ( $driver->supportsValidate() ) {
                        return $driver->validate( $text, $errorStr );
                } else {
-                       throw new MWException( __METHOD__ . ": error text return from HHVM tidy is not supported" );
+                       throw new MWException( __METHOD__ . ": tidy driver does not support validate()" );
                }
        }
 
@@ -83,7 +83,7 @@ class MWTidy {
        /**
         * @return bool|\MediaWiki\Tidy\TidyDriverBase
         */
-       protected static function singleton() {
+       public static function singleton() {
                global $wgUseTidy, $wgTidyInternal, $wgTidyConf, $wgDebugTidy, $wgTidyConfig,
                        $wgTidyBin, $wgTidyOpts;
 
@@ -138,6 +138,9 @@ class MWTidy {
                        case 'Html5Internal':
                                $instance = new MediaWiki\Tidy\Html5Internal( $config );
                                break;
+                       case 'RemexHtml':
+                               $instance = new MediaWiki\Tidy\RemexDriver( $config );
+                               break;
                        case 'disabled':
                                return false;
                        default: