MediaWiki REL1_32
MediaWiki\Tidy\RaggettWrapper Class Reference

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

Public Member Functions

 getWrapped ( $text)
 
 postprocess ( $text)
 

Protected Attributes

int $mMarkerIndex
 
array $mTokens
 

Private Member Functions

 replaceCallback (array $m)
 

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.

Deprecated
since 1.32

Definition at line 20 of file RaggettWrapper.php.

Member Function Documentation

◆ getWrapped()

MediaWiki\Tidy\RaggettWrapper::getWrapped ( $text)
Parameters
string$text
Returns
string

Definition at line 36 of file RaggettWrapper.php.

References MediaWiki\Tidy\RaggettWrapper\replaceCallback().

Referenced by MediaWiki\Tidy\RaggettBase\tidy().

◆ postprocess()

MediaWiki\Tidy\RaggettWrapper::postprocess ( $text)
Parameters
string$text
Returns
string

Definition at line 87 of file RaggettWrapper.php.

◆ replaceCallback()

MediaWiki\Tidy\RaggettWrapper::replaceCallback ( array $m)
private
Parameters
array$m
Returns
string

Definition at line 76 of file RaggettWrapper.php.

References Parser\MARKER_PREFIX.

Referenced by MediaWiki\Tidy\RaggettWrapper\getWrapped().

Member Data Documentation

◆ $mMarkerIndex

int MediaWiki\Tidy\RaggettWrapper::$mMarkerIndex
protected

Definition at line 30 of file RaggettWrapper.php.

◆ $mTokens

array MediaWiki\Tidy\RaggettWrapper::$mTokens
protected

Definition at line 25 of file RaggettWrapper.php.


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