Module:Section link: Difference between revisions

allow blank first parameters, as the template also does this
(actually, just make the sections optional)
(allow blank first parameters, as the template also does this)
Line 72:
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Section link',
valueFunc = function (key, value)
value = value:match('^%s*(.-)%s*$') -- Trim whitespace
-- Allow blank first parameters, as the wikitext template does this.
if value ~= '' or key == 1 then
return value
end
end
})