MediaWiki
1.28.0
|
Class used to hide mw:editsection tokens from Tidy so that it doesn't break them or break on them. More...
Public Member Functions | |
__construct () | |
getWrapped ($text) | |
postprocess ($text) | |
replaceCallback ($m) | |
Protected Attributes | |
$mMarkerIndex | |
ReplacementArray | $mTokens |
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 20 of file RaggettWrapper.php.
MediaWiki\Tidy\RaggettWrapper::__construct | ( | ) |
Definition at line 29 of file RaggettWrapper.php.
MediaWiki\Tidy\RaggettWrapper::getWrapped | ( | $text | ) |
string | $text |
Definition at line 37 of file RaggettWrapper.php.
References ParserOutput\EDITSECTION_REGEX.
Referenced by MediaWiki\Tidy\RaggettBase\tidy().
MediaWiki\Tidy\RaggettWrapper::postprocess | ( | $text | ) |
MediaWiki\Tidy\RaggettWrapper::replaceCallback | ( | $m | ) |
array | $m |
Definition at line 72 of file RaggettWrapper.php.
References Parser\MARKER_PREFIX.
|
protected |
Definition at line 27 of file RaggettWrapper.php.
|
protected |
Definition at line 25 of file RaggettWrapper.php.