Content deleted Content added
sync sandbox |
use preview warning |
||
Line 32:
local oscoord = {}
local getArgs = require('Module:Arguments').getArgs
local
local namespace = mw.title.getCurrentTitle().namespace;
Line 300:
local function alldigits(s)
return string.find(s,"%D") == nil
local function warning(gridref,errmsg)
html = warn("Empty OS grid reference")
else
html = warn('OS grid reference "'..gridref..'" produced error: '..errmsg)
end
return html
end
Line 306 ⟶ 319:
local input = args[1]
if input == nil or string.len(input)==0 then
return warning(nil,nil)
▲ if namespace == 0 then
▲ html = html.."[[Category:Pages with malformed OS coordinates]]"
▲ end
▲ return html
end
local linktitle = args[2]
Line 345 ⟶ 354:
if LL[2] ~= nil then
html = linktitle
html = html..warn(input,LL[2])
▲ if namespace == 0 then
▲ end
return html
end
|