Content deleted Content added
No edit summary |
No edit summary |
||
Line 1:
require('Module:No globals')
local
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
Line 12:
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a
]]
local function target_check (
local number =
local msg;
local category;
Line 28:
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' ..
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' ..
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">
--
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">
end
Line 256 ⟶ 255:
--assemble CITEREF wikilink
local
local target_err_msg;
if '' ~= args.ref then
else
end
target_err_msg = target_check (
source = '[[#' ..
--combine contribution with url to make external link
|