Content deleted Content added
use preview warning |
try implementing our own preview warning function |
||
Line 32:
local oscoord = {}
local getArgs = require('Module:Arguments').getArgs
local namespace = mw.title.getCurrentTitle().namespace;
Line 303 ⟶ 302:
local function warning(gridref,errmsg)
local frame = mw.getCurrentFrame():getParent()
local html
if
html = '<div class="hatnote" style="color:red"><strong>Warning:</strong> '
if gridref == nil then
else▼
html =
▲ else
html = html..'OS grid reference "'..gridref..'" produced error: '..errmsg
end
html = html..' (this message is shown only in preview)</div>'
end
if namespace == 0 then
|