Module:Ordnance Survey coordinates/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 296:
 
local function splitref(s)
local partspos = mw.text.splits:find(s or '\127', '\127'1, true)
if pos then
local text, references
local marker = text:sub(1, pos)
for k, v in ipairs( parts ) do
local parts = mw.text.split(s or '', '[\127]', true)
if v:match('^[^\127]*UNIQ[^\127]*%-ref[^\127]*$') then
referenceslocal =text, (references or '') .. '\127' .. v .. '\127'
for k, v in ipairs( parts ) do
else
if v:match('^[^\127]*UNIQ[^\127]*%-ref[^\127]*$') then
text = (text or '') .. v
references = (references or '') .. marker .. v .. marker
else
text = (text or '') .. v
end
end
return text,reference
else
return text,nil
end
return text,reference
end