Content deleted Content added
args |
use module:list |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1:
local getArgs = require('Module:Arguments').getArgs
local beginText = 'This article incorporates text from the public ___domain [[Pfam]] and [[InterPro]]: '
local p = {}
local function interproLink(
-- text before first space, if any; otherwise, whole arg
▲ return '[https://www.ebi.ac.uk/interpro/entry/' .. entry .. ' ' .. entry .. ']'
local accessionNumber = arg:match('^([^ ]*) ') or arg
-- text after first space, if any; otherwise, accessionNumber
local linkText = arg:match(' (.*)') or accessionNumber
return '[' .. baseUrl .. accessionNumber .. ' ' .. linkText .. ']'
end
local function renderList(args)
local
class = 'inline'
}
for _,
table.insert(list_args, interproLink(a))
end
return require('Module:List').horizontal(list_args)
end
Line 26 ⟶ 33:
return '<div class="error">[[Module:InterPro content]]: required argument 1 is missing</div>'
elseif not args[2] then
return '<div role="note" style="font-style: italic;">
else
return '<div role="note" style="font-style: italic;">
end
end
|