return $driver->tidy( $text );
}
+ /**
+ * Get CSS modules needed if HTML from the current driver is to be displayed.
+ *
+ * This is just a migration tool to allow some changes expected as part of
+ * Tidy replacement (T89331) to be exposed on the client side via user
+ * scripts, without actually replacing tidy. See T49673.
+ *
+ * @return array
+ */
+ public static function getModuleStyles() {
+ $driver = self::singleton();
+ if ( $driver && $driver instanceof MediaWiki\Tidy\RaggettBase ) {
+ return array( 'mediawiki.raggett' );
+ } else {
+ return array();
+ }
+ }
+
/**
* Check HTML for errors, used if $wgValidateAllHtml = true.
*