Actions

Module

Editing Documentation

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 514: Line 514:
 
-- @data - a table of data generated by p.makeStartBoxLinksData
 
-- @data - a table of data generated by p.makeStartBoxLinksData
 
--]]
 
--]]
 
local function escapeBrackets(s)
 
-- Escapes square brackets with HTML entities.
 
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
 
s = s:gsub('%]', ']')
 
return s
 
end
 
 
 
local ret
 
local ret
 
local docTitle = data.docTitle
 
local docTitle = data.docTitle
Line 531: Line 523:
 
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
 
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
 
ret = '[%s] [%s] [%s] [%s]'
 
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
+
ret = ret:gsub('%[', '[') -- Replace square brackets with HTML entities.
 +
ret = ret:gsub('%]', ']')
 
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
 
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
 
else
 
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
+
ret = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
 
ret = escapeBrackets(ret)
 
ret = mw.ustring.format(ret, createLink)
 
 
end
 
end
 
return ret
 
return ret
Line 555: Line 545:
 
-- 'file-namespace-heading' --> 'Summary'
 
-- 'file-namespace-heading' --> 'Summary'
 
-- 'other-namespaces-heading' --> 'Documentation'
 
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
+
-- 'start-box-linkclasses' --> 'mw-editsection plainlinks'
 
-- 'start-box-link-id' --> 'doc_editlinks'
 
-- 'start-box-link-id' --> 'doc_editlinks'
 
-- 'testcases-create-link-display' --> 'create'
 
-- 'testcases-create-link-display' --> 'create'

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)