七日内新公告:全站维护公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:标题替换

猛汉♂百科,万男皆可猛的百科全书!转载请标注来源页面的网页链接,并声明引自猛汉百科。内容不可商用。
跳转到导航 跳转到搜索
模块文档  [创建] [刷新]
local module = { }

function module.main(frame)
	local parent = frame:getParent()
	if parent and parent:getTitle() == "Template:Sandbox/Func/Universnal" then
		frame = parent
	end
	if not frame.args[1] then
		return
	end
	local title = frame.args[1]
	local words_ustr = mw.ustring.gsub(title, "[^%a]", "")
	local words_str = mw.ustring.gsub(title, "[^A-Za-z]", "")
	if words_ustr == words_str then
		frame:callParserFunction("DISPLAYTITLE", title)
	end
	return
end

return module