Module:Section link/sandbox: Difference between revisions

Content deleted Content added
m sync with live module
fix bug when { or } in section name
Line 9:
display = display or section
page = page or ''
-- MediaWiki doesn't allow these in `page`, so only need to do for `section`
section = string.gsub(ret, "{", "{")
section = string.gsub(ret, "}", "}")
return string.format('[[%s#%s|%s]]', page, section, display)
end