Module:Citation/CS1: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
sync to sandbox, fixes problem with broken span in association with double "..", also publisher layout for pressrelease mode
sync to sandbox, adds parameter whitelist
வரிசை 3:
message_tail = {};
}
 
local whitelist = mw.loadData( 'Module:Citation/CS1/Whitelist' );
 
-- Checks that parameter name is valid
function validate( name )
name = tostring( name );
-- Normal arguments
if whitelist.basic_arguments[ name ] then
return true;
end
-- Arguments with numbers in them
name = name:gsub( "%d+", "#" );
if whitelist.numbered_arguments[ name ] then
return true;
end
-- Not found, argument not supported.
return false
end
 
-- Formats a hidden comment for error trapping not intended to be visible to readers
வரி 74 ⟶ 95:
 
-- Formats a wiki style external link
function externallinkid(argsoptions)
local sep = argsoptions.separator or " "
argsoptions.suffix = argsoptions.suffix or ""
local url_string = argsoptions.id
if argsoptions.encode == true or argsoptions.encode == nil then
url_string = mw.uri.encode( url_string );
end
return "[[" .. argsoptions.link .. "|" .. argsoptions.label .. "]]" .. sep .. "[" ..
argsoptions.prefix .. url_string .. argsoptions.suffix .. " " .. nowiki(argsoptions.id) .. "]"
end
 
-- Formats a wiki style internal link
function internallinkid(argsoptions)
local sep = argsoptions.separator or " "
argsoptions.suffix = argsoptions.suffix or ""
return "[[" .. argsoptions.link .. "|" .. argsoptions.label .. "]]" .. sep .. "[[" ..
argsoptions.prefix .. argsoptions.id .. argsoptions.suffix .. "|" .. nowiki(argsoptions.id) .. "]]"
end
 
வரி 347 ⟶ 368:
 
-- Generates a CITEREF anchor ID.
function anchorid(argsoptions)
local P1 = argsoptions[1] or ""
local P2 = argsoptions[2] or ""
local P3 = argsoptions[3] or ""
local P4 = argsoptions[4] or ""
local P5 = argsoptions[5] or ""
-- Bugzilla 46608
வரி 473 ⟶ 494:
local ArchiveURL = args["archive-url"] or args.archiveurl
local URL = args.url or args.URL
local ChapterURL = args["chapter-url"] or args.chapterurl or args["contribution-url"]
local ConferenceURL = args["conference-url"] or args.conferenceurl
local Periodical = args.journal or args.newspaper or args.magazine or args.work
வரி 1,361 ⟶ 1,382:
for k, v in pairs( pframe.args ) do
if v ~= '' then
if not validate( k ) then
if type( k ) ~= 'string' then
-- Exclude empty numbered parameters
if v:match("%S+") ~= nil then
table.insert( z.message_tail, 'Unnamed parameter containing "' .. v .. '" ignored' );
end
elseif validate( k:lower() ) then
table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored (suggest "' .. k:lower() .. '=")' );
else
table.insert( z.message_tail, 'Unknown parameter "' .. k .. '=" ignored' );
end
table.insert( z.error_categories, 'Pages with citations using unsupported parameters' );
end
args[k] = v;
elseif k == 'postscript' then
"https://tamilar.wiki/w/Module:Citation/CS1" இலிருந்து மீள்விக்கப்பட்டது