mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-27 17:50:53 +00:00
Stop stripping comments in TOC data
The parserTest "PageImages with toc and image in heading" covers the case of PageImages comments being left around in TOC data. Depends-On: I10f96435f892b188cffe64b92cdf2701a3e2058b Change-Id: Ie6760dd25f937d4f6acbab1c0e1475b54878d4ed
This commit is contained in:
parent
abf45611d7
commit
d031b380db
|
@ -170,11 +170,7 @@ class ParserFileProcessingHookHandlers implements
|
|||
$parserOutput->setIndicator( $id, $stripped );
|
||||
}
|
||||
}
|
||||
// Strip comments from TOC data
|
||||
$tocData = $parserOutput->getTOCData();
|
||||
foreach ( ( $tocData ? $tocData->getSections() : [] ) as $section ) {
|
||||
$section->line = trim( preg_replace( self::CANDIDATE_REGEX, '', $section->line ) );
|
||||
}
|
||||
// We may have comments in TOC data - Parser::cleanupTocLine strips them for us.
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue