diff options
Diffstat (limited to 'www/wiki/includes/tidy/Html5Internal.php')
-rw-r--r-- | www/wiki/includes/tidy/Html5Internal.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/www/wiki/includes/tidy/Html5Internal.php b/www/wiki/includes/tidy/Html5Internal.php new file mode 100644 index 00000000..4ad82002 --- /dev/null +++ b/www/wiki/includes/tidy/Html5Internal.php @@ -0,0 +1,18 @@ +<?php + +namespace MediaWiki\Tidy; + +class Html5Internal extends TidyDriverBase { + private $balancer; + public function __construct( array $config ) { + parent::__construct( $config + [ + 'strict' => true, + 'tidyCompat' => true, + ] ); + $this->balancer = new Balancer( $this->config ); + } + + public function tidy( $text ) { + return $this->balancer->balance( $text ); + } +} |