MediaWiki REL1_40
MediaWiki\Tidy\RemexDriver Class Reference

Inherits MediaWiki\Tidy\TidyDriverBase.

Collaboration diagram for MediaWiki\Tidy\RemexDriver:

Public Member Functions

 __construct (ServiceOptions $options)
 
 tidy ( $text, ?callable $textProcessor=null)
 Clean up HTML.
Parameters
string$textHTML document fragment to clean up
?callable$textProcessorA callback to run on the contents of text nodes (not elements or attribute values). This can be used to apply text modifications like french spacing or smart quotes, without affecting element or attribute markup.
Returns
string The corrected HTML output

 
- Public Member Functions inherited from MediaWiki\Tidy\TidyDriverBase
 __construct ( $config)
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Tidy\TidyDriverBase
 $config
 

Detailed Description

Definition at line 15 of file RemexDriver.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ tidy()

MediaWiki\Tidy\RemexDriver::tidy ( $text,
?callable $textProcessor = null )

Clean up HTML.

Parameters
string$textHTML document fragment to clean up
?callable$textProcessorA callback to run on the contents of text nodes (not elements or attribute values). This can be used to apply text modifications like french spacing or smart quotes, without affecting element or attribute markup.
Returns
string The corrected HTML output

Reimplemented from MediaWiki\Tidy\TidyDriverBase.

Definition at line 49 of file RemexDriver.php.

References wfDebug().

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Tidy\RemexDriver::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const TidyConfig
Name constant for the TidyConfig setting, for use with Config::get()
const ParserEnableLegacyMediaDOM
Name constant for the ParserEnableLegacyMediaDOM setting, for use with Config::get()
Access: internal

Definition at line 23 of file RemexDriver.php.


The documentation for this class was generated from the following file: