Content deleted Content added
tweak output |
tweak output |
||
Line 32:
local function is_set( var )
return
end
Line 67:
function p.main (frame)
local args = getArgs (frame);
local result = {};
local article;
local article_postfix = args['article-postfix'] or ' ';▼
local
local
local
local
local
local
local list_leadout;
if is_set (args['list-leadout']) then
mw.ustring.match(mw.ustring.sub(args['list-leadout'],1,1), '[%a]') and ' ' or '',
leadout_postfix,
else
end▼
if args['article-link'] or args['article-name'] then end▼
article = make_wikilink (args['article-link'], args['article-name']);▼
▲ if is_set (article) then
article = table.concat ({article, article_postfix});▼
end
if is_set (
elseif is_set (article_postfix) then
'[', -- open ext link markup▼
link_prefix, -- url prefix▼
▲ end
mw.uri.encode (item), -- item is part of url▼
link_postfix, -- url postfix▼
'
▲ link_prefix, -- url prefix
});▼
▲ mw.uri.encode (item), -- item is part of url
▲ link_postfix, -- url postfix
item_prefix, -- label prefix▼
item_postfix, -- item postfix
▲ });
item = table.concat ({ -- create an unlinked item
item_prefix, -- label prefix
item, -- item as label
item_postfix, -- item postfix
});
table.insert (result, item); -- add the item to the result list▼
end
if is_set (args['list-leadout']) then
return table.concat ({article, mw.text.listToText (result, list_separator, list_leadout)});▼
else
▲ item_prefix, -- label prefix
▲ item, -- item as label
▲ item_postfix, -- item postfix
▲ });
end
▲ table.insert (result, item); -- add the item to the result list
▲ end
▲ if is_set (args['list-leadout']) then
▲ return table.concat ({article, mw.text.listToText (result, list_separator, list_leadout)});
else
return ''
end
end
|