Module:Check isxn: Difference between revisions

Undid revision 712696584 by Frietjes (talk)
(add entry points for checking lists)
(Undid revision 712696584 by Frietjes (talk))
Line 145:
function p.check_issn(frame)
return check_issn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error')
end
 
function p.check_isbn_list(frame)
local isxns = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "%s*,%s*")
local res = {}
for i, isxn in ipairs(isxns) do
table.insert(res, check_isbn(isxn, frame.args['error'] or frame:getParent().args['error'] or 'error') )
end
return table.concat(res, ', ')
end
 
function p.check_ismn_list(frame)
local isxns = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "%s*,%s*")
local res = {}
for i, isxn in ipairs(isxns) do
table.insert(res, check_ismn(isxn, frame.args['error'] or frame:getParent().args['error'] or 'error') )
end
return table.concat(res, ', ')
end
 
function p.check_issn_list(frame)
local isxns = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "%s*,%s*")
local res = {}
for i, isxn in ipairs(isxns) do
table.insert(res, check_issn(isxn, frame.args['error'] or frame:getParent().args['error'] or 'error') )
end
return table.concat(res, ', ')
end
 
Anonymous user