模块:Utils:修订间差异

来自Limbo Wiki Mirror
无编辑摘要
Gaoice留言 | 贡献
已从limbowiki:模块:Utils导入11个版本
 
(没有差异)

2025年6月26日 (四) 13:43的最新版本

此模块的文档可以在模块:Utils/doc创建

local p = {} --啥都有。

function p.urlEncode(frame)
	local a = string.gsub(frame.args[1], "([^%w%.%- ])", 
		function(c)
			return string.format("%%%02X", string.byte(c))
		end
	)
	return a;
end

function p.ind(frame)
	f = mw.getCurrentFrame();
	f:extensionTag {
		name = "indicator",
		content = '<div class="Indicator" id="Indicator-' .. frame.args[1] ..'">' .. frame.args[2] .. "</div>",
		args = {name = frame.args[1]}
	};
	return;
end

return p