Open main menu
Home
Random
Log in
Settings
About RobotX
Disclaimers
RobotX
Search
Changes
Section link
← Older edit
Module:Section link
(view source)
Revision as of 13:28, 1 October 2020
214 bytes added
,
13:28, 1 October 2020
m
1 revision imported
Line 9:
Line 9:
display = display or section
display = display or section
page = page or ''
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)
return string.format('[[%s#%s|%s]]', page, section, display)
end
end
Joelmartin
Bots
,
Bureaucrats
, contributor,
Interface administrators
, lookupuser,
Administrators
4,000
edits