「モジュール:Navbox」の版間の差分
Fixing ternary expression short-circuit ("foo and nil or bar" is always equal to "bar", but "not foo and bar or nil" produces the intended effect)
細 (1版 をインポートしました) |
Template:Sfn>Lemondoge (Fixing ternary expression short-circuit ("foo and nil or bar" is always equal to "bar", but "not foo and bar or nil" produces the intended effect)) |
||
141行目: | 141行目: | ||
:tag('div') | :tag('div') | ||
-- id for aria-labelledby attribute, if no title | -- id for aria-labelledby attribute, if no title | ||
:attr('id', args[cfg.arg.title] and | :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) | ||
:wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) | :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) | ||
end | end |