Use new Parser accessors

And there's no need to manually call firstCallInit() anymore, the
Parser will call it in all the necessary places automatically.

Depends-On: Ida62767f3ca53f99609cae01d3a20051bb92ccab
Depends-On: Ia2d98baf6caed2cd779cb00aceba5785cf13d633
Change-Id: I7e2097fa733506985a4b252fc9b01b03f6c28885
This commit is contained in:
Kunal Mehta 2018-08-13 22:55:13 -07:00
parent 0ba594b8ad
commit 35edfa6018

View file

@ -63,7 +63,6 @@ class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule {
$lang = MediaWikiServices::getInstance()->getContentLanguage();
$registry = ExtensionRegistry::getInstance();
$parser = MediaWikiServices::getInstance()->getParser();
$parser->firstCallInit();
// initialize configuration
$config = [
@ -71,8 +70,8 @@ class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule {
'tagModes' => $registry->getAttribute( 'CodeMirrorTagModes' ),
'tags' => array_fill_keys( $parser->getTags(), true ),
'doubleUnderscore' => [ [], [] ],
'functionSynonyms' => $parser->mFunctionSynonyms,
'urlProtocols' => $parser->mUrlProtocols,
'functionSynonyms' => $parser->getFunctionSynonyms(),
'urlProtocols' => $parser->getUrlProtocols(),
'linkTrailCharacters' => $lang->linkTrail(),
];