Merge "Don't configure parser-factory-callback"

This commit is contained in:
jenkins-bot 2024-04-12 09:47:22 +00:00 committed by Gerrit Code Review
commit 05ece5f645

View file

@ -2,10 +2,7 @@
namespace MediaWiki\Extension\Math;
use ParserOptions;
use ValueFormatters\FormatterOptions;
use ValueParsers\StringParser;
use Wikibase\Repo\Parsers\WikibaseStringValueNormalizer;
use Wikibase\Repo\Rdf\DedupeBag;
use Wikibase\Repo\Rdf\EntityMentionListener;
use Wikibase\Repo\Rdf\RdfVocabulary;
@ -38,10 +35,6 @@ class WikibaseHook {
$validators[] = new MathValidator();
return $validators;
},
'parser-factory-callback' => static function ( ParserOptions $options ) {
$normalizer = new WikibaseStringValueNormalizer( WikibaseRepo::getStringNormalizer() );
return new StringParser( $normalizer );
},
'formatter-factory-callback' => static function ( $format, FormatterOptions $options ) {
return new MathFormatter( $format );
},