Module:Coordinates: Difference between revisions

fix note handling
m (Protected Module:Coordinates: Highly visible template ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite)))
(fix note handling)
Line 20:
 
--[[ Helper function, replacement for {{coord/display/title}} ]]
function displaytitle (s, notes)
local l = "[[Geographic coordinate system|Coordinates]]: " .. s
local co = '<span id="coordinates">' .. l .. notes .. '</span>';
return '<span style="font-size: small;">' .. co .. '</span>';
end
 
--[[ Helper function, Replacement for {{coord/display/inline}} ]]
function displayinline (s, notes)
return s .. notes
end
 
Line 566:
if string.find( Display, 'inline' ) ~= nil or Display == 't' or
Display == 'it' or Display == 'ti' then
text = displayinline(contents, Notes)
end
if string.find( Display, 'title' ) ~= nil or Display == 'i' or
Display == 'it' or Display == 'ti' then
text = text .. displaytitle(contents, Notes)
end
return text .. Notes
end
 
Anonymous user