3 namespace MediaWiki\Tidy
;
6 * Base class for HTML cleanup utilities
8 abstract class TidyDriverBase
{
12 public function __construct( $config ) {
13 $this->config
= $config;
19 * @param string $text HTML document fragment to clean up
20 * @param ?callable $textProcessor A callback to run on the contents of
21 * text nodes (not elements or attribute values). This can be used to
22 * apply text modifications like french spacing or smart quotes, without
23 * affecting element or attribute markup.
24 * @return string The corrected HTML output
26 abstract public function tidy( $text, ?callable
$textProcessor = null );