Jump to content

Module:Section link: Difference between revisions

allow blank first parameters, as the template also does this
m>Mr. Stradivarius
(actually, just make the sections optional)
m>Mr. Stradivarius
(allow blank first parameters, as the template also does this)
Line 72: Line 72:
function p.main(frame)
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Section link'
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
})
})


Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.