MediaWiki  1.23.2
MWTidyWrapper Class Reference

Class used to hide mw:editsection tokens from Tidy so that it doesn't break them or break on them. More...

Collaboration diagram for MWTidyWrapper:

Public Member Functions

 __construct ()
 
 getWrapped ( $text)
 
 postprocess ( $text)
 
 replaceCallback ( $m)
 

Protected Attributes

 $mMarkerIndex
 
ReplacementArray $mTokens
 
 $mUniqPrefix
 

Detailed Description

Class used to hide mw:editsection tokens from Tidy so that it doesn't break them or break on them.

This is a bit of a hack for now, but hopefully in the future we may create a real postprocessor or something that will replace this. It's called wrapper because for now it basically takes over MWTidy::tidy's task of wrapping the text in a xhtml block

This re-uses some of the parser's UNIQ tricks, though some of it is private so it's duplicated. Perhaps we should create an abstract marker hiding class.

Definition at line 36 of file Tidy.php.

Constructor & Destructor Documentation

◆ __construct()

MWTidyWrapper::__construct ( )

Definition at line 46 of file Tidy.php.

Member Function Documentation

◆ getWrapped()

MWTidyWrapper::getWrapped (   $text)
Parameters
$textstring
Returns
string

Definition at line 55 of file Tidy.php.

References array(), and ParserOutput\EDITSECTION_REGEX.

Referenced by MWTidy\tidy().

◆ postprocess()

MWTidyWrapper::postprocess (   $text)
Parameters
$textstring
Returns
string

Definition at line 96 of file Tidy.php.

◆ replaceCallback()

MWTidyWrapper::replaceCallback (   $m)
Parameters
$marray
Returns
string

Definition at line 85 of file Tidy.php.

Member Data Documentation

◆ $mMarkerIndex

MWTidyWrapper::$mMarkerIndex
protected

Definition at line 44 of file Tidy.php.

◆ $mTokens

ReplacementArray MWTidyWrapper::$mTokens
protected

Definition at line 40 of file Tidy.php.

◆ $mUniqPrefix

MWTidyWrapper::$mUniqPrefix
protected

Definition at line 42 of file Tidy.php.


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