37 $this->mMarkerIndex = 0;
40 $wrappedtext = preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
41 [ $this,
'replaceCallback' ], $text );
43 $wrappedtext = preg_replace_callback(
'/<\\/?mw:toc>/',
44 [ $this,
'replaceCallback' ], $wrappedtext );
46 $wrappedtext = preg_replace_callback(
'/<math(.*?)<\\/math>/s',
47 [ $this,
'replaceCallback' ], $wrappedtext );
50 $wrappedtext = preg_replace(
'!<(link|meta)([^>]*?)(/{0,1}>)!',
'<html-$1$2$3', $wrappedtext );
52 $wrappedtext = preg_replace_callback(
'!<style([^>]*)>(.*?)</style>!s',
function ( $m ) {
53 return '<html-style' . $m[1] .
'>'
60 $wrappedtext = preg_replace(
"!<li>([ \r\n\t\f]*)</li>!",
61 '<li datafld="" class="mw-empty-elt">\1</li>', $wrappedtext );
64 $wrappedtext =
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' .
65 ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>' .
66 '<head><title>test</title></head><body>' . $wrappedtext .
'</body></html>';