445
edits
(undo brute force hiding of deprecated parameter and missing periodical error messages;) |
m (21 revisions imported from templatewiki:Module:Citation/CS1/Utilities) |
||
Line 1: | Line 1: | ||
local u = {} | |||
local z = { | local z = { | ||
Line 124: | Line 125: | ||
}); | }); | ||
-- message = table.concat ({message, ' (', substitute (cfg.presentation['wikilink'], | |||
-- {cfg.messages['help page link'] .. '#' .. error_state.anchor, cfg.messages['help page label']}), ')'}); | |||
-- message = message .. " ([[" .. cfg.messages['help page link'] .. | |||
-- "#" .. error_state.anchor .. "|" .. | |||
-- cfg.messages['help page label'] .. "]])"; | |||
z.error_ids[ error_id ] = true; | z.error_ids[ error_id ] = true; | ||
if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) | if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) | ||
Line 334: | Line 341: | ||
local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] | local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] | ||
L, D = str:match (' | L, D = str:match ('%[%[([^|]+)|([^%]]+)%]%]'); -- get L and D from [[L|D]] | ||
if not is_set (D) then -- if no separate link | if not is_set (D) then -- if no separate link | ||
D = str:match (' | D = str:match ('%[%[([^%]]*)|*%]%]'); -- get D from [[D]] | ||
wl_type = 1; | wl_type = 1; | ||
end | end | ||
Line 350: | Line 357: | ||
return wl_type, D, L or ''; | return wl_type, D, L or ''; | ||
end | end | ||
Line 405: | Line 372: | ||
return { | return { -- return exported functions and tables | ||
is_set = is_set, | is_set = is_set, | ||
in_array = in_array, | in_array = in_array, | ||
substitute = substitute, | substitute = substitute, | ||
Line 422: | Line 387: | ||
make_wikilink = make_wikilink, | make_wikilink = make_wikilink, | ||
set_selected_modules = set_selected_modules, | set_selected_modules = set_selected_modules, | ||
z = z, | |||
z = z, | |||
} | } |