欢迎来到MCServerWiki!如果您是第一次来到这里,请点击:创建账户

“模块:Yesno”的版本历史

来自MCServerWiki

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

  • 当前之前 2022年5月6日 (五) 00:53PexEric 讨论 贡献 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'…”