Module:Citation/CS1: Difference between revisions

    m>Dragons flight
    (sanity check the italics for other single quotes)
    m>Dragons flight
    (Use empty spans rather than spaces)
    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 = "<span />" .. Chapter; end
                 if Chapter:sub(-1,-1) == "'" then Chapter = Chapter .. " "; end
                 if Chapter:sub(-1,-1) == "'" then Chapter = Chapter .. "<span />"; end
                 Chapter = "''" .. Chapter .. "''"
                 Chapter = "''" .. Chapter .. "''"
             else
             else
    Line 591: Line 591:
                 Title = "\"" .. Title .. "\""
                 Title = "\"" .. Title .. "\""
             else
             else
                 if Title:sub(1,1) == "'" then Title = " " .. Title; end
                 if Title:sub(1,1) == "'" then Title = "<span />" .. Title; end
                 if Title:sub(-1,-1) == "'" then Title = Title .. " "; end
                 if Title:sub(-1,-1) == "'" then Title = Title .. "<span />"; end
                  
                  
                 Title = "''" .. Title .. "''"
                 Title = "''" .. Title .. "''"
    Line 773: Line 773:
             if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end
             if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end
             if ( LaySource ~= nil ) then  
             if ( LaySource ~= nil ) then  
                 if LaySource:sub(1,1) == "'" then LaySource = " " .. LaySource; end
                 if LaySource:sub(1,1) == "'" then LaySource = "<span />" .. LaySource; end
                 if LaySource:sub(-1,-1) == "'" then LaySource = LaySource .. " "; end
                 if LaySource:sub(-1,-1) == "'" then LaySource = LaySource .. "<span />"; end


                 LaySource = " &ndash; ''" .. LaySource .. "''"  
                 LaySource = " &ndash; ''" .. LaySource .. "''"  
    Line 815: 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 Periodical:sub(1,1) == "'" then Periodical = " " .. Periodical; end
             if Periodical:sub(1,1) == "'" then Periodical = "<span />" .. Periodical; end
             if Periodical:sub(-1,-1) == "'" then Periodical = Periodical .. " "; end
             if Periodical:sub(-1,-1) == "'" then Periodical = Periodical .. "<span />"; end


             if ( Title and Title ~= "") then  
             if ( Title and Title ~= "") then