Module:Citation/CS1: Difference between revisions
sanity check the italics for other single quotes
m>Dragons flight (Move issue next to volume, is this going to break lots of things?) |
m>Dragons flight (sanity check the italics for other single quotes) |
||
Line 563: | Line 563: | ||
and config.CitationClass ~= "encyclopaedia" | and config.CitationClass ~= "encyclopaedia" | ||
) then | ) then | ||
if Chapter:sub(1,1) == "'" then Chapter = " " .. Chapter; end | |||
if Chapter:sub(-1,-1) == "'" then Chapter = Chapter .. " "; end | |||
Chapter = "''" .. Chapter .. "''" | Chapter = "''" .. Chapter .. "''" | ||
else | else | ||
Line 589: | Line 591: | ||
Title = "\"" .. Title .. "\"" | Title = "\"" .. Title .. "\"" | ||
else | else | ||
if Title:sub(1,1) == "'" then Title = " " .. Title; end | |||
if Title:sub(-1,-1) == "'" then Title = Title .. " "; end | |||
Title = "''" .. Title .. "''" | Title = "''" .. Title .. "''" | ||
end | end | ||
Line 767: | Line 772: | ||
if ( nil ~= LaySummary and "" ~= LaySummary ) then | if ( nil ~= LaySummary and "" ~= LaySummary ) then | ||
if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end | if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end | ||
if ( LaySource ~= nil ) then LaySource = " – ''" .. LaySource .. "''" else LaySource = "" end | if ( LaySource ~= nil ) then | ||
if LaySource:sub(1,1) == "'" then LaySource = " " .. LaySource; end | |||
if LaySource:sub(-1,-1) == "'" then LaySource = LaySource .. " "; end | |||
LaySource = " – ''" .. LaySource .. "''" | |||
else | |||
LaySource = "" | |||
end | |||
Lay = " [" .. LaySummary .. " lay summary]" .. LaySource .. LayDate | Lay = " [" .. LaySummary .. " lay summary]" .. LaySource .. LayDate | ||
else | else | ||
Line 803: | Line 815: | ||
-- Several of the above rely upon detecting this as nil, so do it last. | -- Several of the above rely upon detecting this as nil, so do it last. | ||
if ( Periodical ~= nil and Periodical ~="" ) then | if ( Periodical ~= nil and Periodical ~="" ) then | ||
if ( Title and Title ~= "") | if Periodical:sub(1,1) == "'" then Periodical = " " .. Periodical; end | ||
if Periodical:sub(-1,-1) == "'" then Periodical = Periodical .. " "; end | |||
if ( Title and Title ~= "") then | |||
Periodical = sepc .. " ''" .. Periodical .. "''" | |||
else | |||
Periodical = "''" .. Periodical .. "''" | |||
end | end | ||
else Periodical = "" end | else Periodical = "" end |