Module:BASICPAGENAME
外观
local i = {}
function i.BASICPAGENAME(frame)
local basicpagename = frame:getParent().args[1] or '';
if basicpagename == '' then
basicpagename = mw.title.getCurrentTitle().subpageText;
end
basicpagename = mw.ustring.gsub(basicpagename, '%s[%((].*[%))]', '');
basicpagename = mw.ustring.gsub(basicpagename, '.*%/', '');
return basicpagename;
end
return i;