Module:Convert/wikidata: Difference between revisions

Content deleted Content added
m Protected "Module:Convert/wikidata": High-risk module ([Edit=Require template editor access] (indefinite))
Line 307:
local text = parms.input -- should be a trimmed, non-empty string
local pid = text:match('^P%d+$')
local sep = ','
local sep = parms.test == '#' and '#' or ',' -- LATER remove test when decide what is wanted
local special = specials[parms[index]]
if special then
Line 337:
end
local item = ucode
if item == parms[index] then
-- Remove specified output unit if it is the same as the Wikidata unit.
-- For example, {{convert|input=P2044|km}} with property "12 km".
table.remove(parms, index)
end
for i = result.n, 1, -1 do
insert2(result[i][1], item)