Open main menu

Changes

Module:Section link

214 bytes added, 19:17, 30 June 2020
fix error for when {{}} are used inside of the slink (TPER)
display = display or section
page = page or ''
-- MediaWiki doesn't allow these in `page`, so only need to do for `section`
if type(section) == 'string' then
section = string.gsub(section, "{", "{")
section = string.gsub(section, "}", "}")
end
return string.format('[[%s#%s|%s]]', page, section, display)
end
Anonymous user