Topic on Extension talk:WikiMarkdown

Parsedown Extended error

4
S0ring (talkcontribs)

When LocalSettings.php allows usage of Parsedown Extended:

wfLoadExtension( 'WikiMarkdown' );

$wgAllowMarkdownExtra = true; // allows usage of Parsedown Extra

$wgAllowMarkdownExtended = true; // allows usage of Parsedown Extended


the following error occurs:

InvalidArgumentException: Sub-setting 'single_dollar' does not exist in 'math'.

Backtrace:

from /var/www/html/vendor/benjaminhoegh/parsedown-extended/src/ParsedownExtended.php(250)

#0 /var/www/html/vendor/benjaminhoegh/parsedown-extended/src/ParsedownExtended.php(190): ParsedownExtended->initializeSettings(array)

#1 /var/www/html/extensions/WikiMarkdown/includes/WikiMarkdown.php(327): ParsedownExtended->__construct(array)

#2 /var/www/html/extensions/WikiMarkdown/includes/WikiMarkdown.php(215): WikiMarkdown::getParsedown()

#3 /var/www/html/extensions/WikiMarkdown/includes/WikiMarkdown.php(46): WikiMarkdown::parseMarkdown(string, array)

#4 /var/www/html/includes/parser/Parser.php(4019): WikiMarkdown::parserHook(string, array, Parser, PPFrame_Hash)

#5 /var/www/html/includes/parser/PPFrame_Hash.php(353): Parser->extensionSubstitution(array, PPFrame_Hash, boolean)

#6 /var/www/html/includes/parser/Parser.php(2953): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#7 /var/www/html/includes/parser/Parser.php(1609): Parser->replaceVariables(string)

#8 /var/www/html/includes/parser/Parser.php(723): Parser->internalParse(string)

#9 /var/www/html/includes/content/WikitextContentHandler.php(301): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)

#10 /var/www/html/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, ParserOutput)

#11 /var/www/html/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)

#12 /var/www/html/includes/EditPage.php(4535): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(WikitextContent, Title, NULL, ParserOptions)

#13 /var/www/html/includes/EditPage.php(4438): EditPage->doPreviewParse(WikitextContent)

#14 /var/www/html/includes/EditPage.php(3144): EditPage->getPreviewText()

#15 /var/www/html/includes/EditPage.php(779): EditPage->showEditForm()

#16 /var/www/html/includes/actions/EditAction.php(73): EditPage->edit()

#17 /var/www/html/includes/actions/SubmitAction.php(38): EditAction->show()

#18 /var/www/html/includes/MediaWiki.php(542): SubmitAction->show()

#19 /var/www/html/includes/MediaWiki.php(322): MediaWiki->performAction(Article, Title)

#20 /var/www/html/includes/MediaWiki.php(904): MediaWiki->performRequest()

#21 /var/www/html/includes/MediaWiki.php(562): MediaWiki->main()

#22 /var/www/html/index.php(50): MediaWiki->run()

#23 /var/www/html/index.php(46): wfIndexMain()

#24 {main}


Setting single_dollar to true or false doesn't fix the error

$wgParsedownExtendedParameters = [

           'math' => [

               'single_dollar' => true

           ],

           'sup' => true,

           'sub' => true

       ];

Kuenzign (talkcontribs)

What version of Parsedown Extended are you using?

Kuenzign (talkcontribs)

It looks like Parsedown Extended 1.2+ completely changes the configs. Please try downgrading to version 1.1.2 of Parsedown Extended.

99.192.96.81 (talkcontribs)

This worked perfectly, thank you!

Reply to "Parsedown Extended error"