模块:Yesno:修订历史

跳到导航 跳到搜索

差异选择:选中要对比的版本的单选按钮,按Enter键或下方的按钮。
说明:(当前)=与最后版本之间的差异,(之前)=与上一版本之间的差异,=小编辑。

2022年12月29日 (星期四)

  • 当前之前 13:292022年12月29日 (四) 13:29Weili0677 讨论 贡献 745字节 +745 创建页面,内容为“-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y'…”