Page MenuHomePhabricator

Nowiki tag in a module parameter results as a linter error
Closed, DuplicatePublic

Description

{{#invoke:Color contrast
|ratio
|<nowiki>#</nowiki>ffcb6b
|#0645ad
}}

https://en.wikipedia.org/wiki/Module:Color_contrast
https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual/ru#mw.text.unstripNoWiki

In real pages and in preview it works fine and shows "5.6881811413232".
But the Special:ExpandTemplates shows the error text "?".

For example:

<div style="background:{{#ifexpr:{{#invoke:Color contrast|ratio|<nowiki>#</nowiki>ffcb6b|#202122}} < 4|#fff;|#000;}}></div>

Special:ExpandTemplates:

<div style="background:<strong class="error">Expression error: Unrecognized punctuation character &quot;?&quot;.</strong>></div>

In real pages and in preview it works fine.
https://en.wikipedia.org/wiki/User:PerfektesChaos/js/lintHint shows LintErrors and page with it falls into the Special:LintErrors/stripped-tag list.
Linter see an error on this page https://ru.wikipedia.org/wiki/Шаблон:Цвет/Река