Content deleted Content added
Oops, lua, not wikitext |
another attempt |
||
Line 84:
function p._urlToWiki(args)
-- Check the input is valid.
if args.blank == "yes" then▼
else▼
local input = args[1] or args.url or error("No URL specified", 2)▼
end▼
if type(input) ~= "string" then
error("The URL must be a string value", 2)▼
if type(input) == "nil" then
else
▲ error("The URL must be a string value", 2)
end
return ""
end
input = mw.text.trim(input)
Line 220 ⟶ 225:
function p.urlToWiki(frame)
local args = require('Module:Arguments').getArgs(frame, {
wrappers = {{'Template:Urltowiki','Template:Urltowiki/sandbox'}}
})
return p._urlToWiki(args)
|