In ScribuntoContentHandler use the new ParserFactory::getInstance()

To avoid an exception when the parser is re-entered.

Bug: T310948
Depends-On: I762b191e978c2d1bbc9f332c9cfa047888ce2e67
Change-Id: I5013ed2a2958c3ff422778f9146f663aff0f5939
This commit is contained in:
Tim Starling 2022-06-20 16:51:19 +10:00
parent 04f0866a88
commit a0a0c3ee7e
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@
"license-name": "GPL-2.0-or-later AND MIT",
"type": "parserhook",
"requires": {
"MediaWiki": ">= 1.38.0"
"MediaWiki": ">= 1.39.0"
},
"APIModules": {
"scribunto-console": "MediaWiki\\Extension\\Scribunto\\ApiScribuntoConsole"

View file

@ -114,7 +114,7 @@ class ScribuntoContentHandler extends CodeContentHandler {
$parserOptions = $cpoParams->getParserOptions();
$revId = $cpoParams->getRevId();
$generateHtml = $cpoParams->getGenerateHtml();
$parser = MediaWikiServices::getInstance()->getParser();
$parser = MediaWikiServices::getInstance()->getParserFactory()->getInstance();
$text = $content->getText();
// Get documentation, if any