requestRestbasePageHtml( $revision ); $doc = DOMUtils::parseHTML( $response['body'] ); $container = DOMCompat::getBody( $doc ); CommentUtils::unwrapParsoidSections( $container ); $title = Title::newFromLinkTarget( $revision->getPageAsLinkTarget() ); return CommentParser::newFromGlobalState( $container, $title ); } /** * @param RevisionRecord $revision * @return array */ abstract protected function requestRestbasePageHtml( RevisionRecord $revision ): array; }