Module:Formatage du titre
Apparence
La documentation pour ce module peut être créée à Module:Formatage du titre/doc
local p = {}
function p.newPagename(frame)
local pagename = mw.title.getCurrentTitle().text
local args = frame.args
local lang
if args[1] ~= '' then
lang = args[1]
end
if pagename:match(' %(.+%)$') then
if lang then
return "''" .. '<span lang="' .. lang .. '">' .. pagename:gsub(' %(.+%)$', "</span>''%0")
else
return "''" .. pagename:gsub(' %(.+%)$', "''%0")
end
else
if lang then
return "''" .. '<span lang="' .. lang .. '">' .. pagename .. "</span>" .. "''"
else
return "''" .. pagename .. "''"
end
end
end
return p