1 124
modifications
| Ligne 1 : | Ligne 1 : | ||
local a = require('Module:Arguments') | |||
local com = {} | local com = {} | ||
| Ligne 22 : | Ligne 23 : | ||
return true | return true | ||
end | end | ||
end | |||
function com.pagename(frame) | |||
local args = a.getArgs(frame) | |||
local title = args['title'] | |||
if not title then | |||
title = mw.title.getCurrentTitle() | |||
end | |||
local disambig = string.find(title, '%(') | |||
local check = disambig | |||
while check do | |||
local check = string.find(title, '%(', check + 1) | |||
if check ~= 0 then | |||
disambig = check | |||
end | |||
end | |||
title = string.sub(title, 1, check) | |||
return title | |||
end | end | ||
return com | return com | ||