diff --git a/includes/Hooks/ParserFileProcessingHookHandlers.php b/includes/Hooks/ParserFileProcessingHookHandlers.php index 3264592..728ac5b 100644 --- a/includes/Hooks/ParserFileProcessingHookHandlers.php +++ b/includes/Hooks/ParserFileProcessingHookHandlers.php @@ -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. } /**