Module:Citation/CS1: Difference between revisions

Bug fix in strip_apostrophe_markup();
m>Trappist the monk
(Synch from sandbox; script error fix in strip_apostrophe_markup();)
m>Trappist the monk
(Bug fix in strip_apostrophe_markup();)
Line 714: Line 714:
]]
]]
function strip_apostrophe_markup (argument)
function strip_apostrophe_markup (argument)
local pattern, cap, cap2;
local pattern='';
local cap='';
local cap2='';
if not is_set (argument) then return argument; end
if not is_set (argument) then return argument; end
Line 728: Line 730:
elseif argument:match ("%'%'%'.*%'%'.*%'%'%'%'%'") then -- bold italic followed by italic (3, 2, 5)
elseif argument:match ("%'%'%'.*%'%'.*%'%'%'%'%'") then -- bold italic followed by italic (3, 2, 5)
pattern, cap, cap2 = argument:match ("(%'%'%'(.*)%'%'(.*)%'%'%'%'%')");
pattern, cap, cap2 = argument:match ("(%'%'%'(.*)%'%'(.*)%'%'%'%'%')");
elseif argument:match ("%'%'%'.*%'%'%'%'%'.*%'%'") then -- bold italic followed by italic (3, 5, 2)
pattern, cap, cap2 = argument:match ("(%'%'%'(.*)%'%'%'%'%'(.*)%'%')");
elseif argument:match ("%'%'.*%'%'%'%'%'.*%'%'%'") then -- bold italic followed by italic (2, 5, 3)
pattern, cap, cap2 = argument:match ("(%'%'(.*)%'%'%'%'%'(.*)%'%'%')");
elseif argument:match ("%'%'.*%'%'%'.*%'%'%'%'%'") then -- italic followed by bold (2, 3, 5)
elseif argument:match ("%'%'.*%'%'%'.*%'%'%'%'%'") then -- italic followed by bold (2, 3, 5)
pattern, cap, cap2 = argument:match ("(%'%'(.*)%'%'%'(.*)%'%'%'%'%')");
pattern, cap, cap2 = argument:match ("(%'%'(.*)%'%'%'(.*)%'%'%'%'%')");
Line 1,445: Line 1,451:
local ArchiveURL = A['ArchiveURL'];
local ArchiveURL = A['ArchiveURL'];
local URL = A['URL']
local URL = A['URL']
local URLorigin = A:ORIGIN('URL');
local URLorigin = A:ORIGIN('URL'); -- get name of parameter that holds URL
local ChapterURL = A['ChapterURL'];
local ChapterURL = A['ChapterURL'];
local ChapterURLorigin = A:ORIGIN('ChapterURL');
local ChapterURLorigin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL
local ConferenceURL = A['ConferenceURL'];
local ConferenceURL = A['ConferenceURL'];
local ConferenceURLorigin = A:ORIGIN('ConferenceURL');
local ConferenceURLorigin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL
local Periodical = A['Periodical'];
local Periodical = A['Periodical'];


Line 1,497: Line 1,503:
local Transcript = A['Transcript'];
local Transcript = A['Transcript'];
local TranscriptURL = A['TranscriptURL']  
local TranscriptURL = A['TranscriptURL']  
local TranscriptURLorigin = A:ORIGIN('TranscriptURL');
local TranscriptURLorigin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL
local sepc = A['Separator'];
local sepc = A['Separator'];


Line 1,931: Line 1,937:
end
end
elseif is_set(ChapterURL) then
elseif is_set(ChapterURL) then
Chapter = Chapter .. " " .. externallink( ChapterURL, nil, ChapterURLorigin ) ..  
Chapter = Chapter .. " " .. externallink( ChapterURL, nil, ChapterURLorigin ) .. TransError; -- ChapterURLorigin holds the name of parameter
TransError;
else
else
Chapter = Chapter .. TransError;
Chapter = Chapter .. TransError;
Anonymous user