Module:Find sources/autodoc and Module:Find sources/autodoc/sandbox: Difference between pages
(Difference between pages)
imported>Gonnym use proper scopes which automatically apply bold |
imported>Gonnym No edit summary |
||
Line 3: | Line 3: | ||
local TEMPLATE_LIST = ROOT_PAGE .. '/templates' -- template config module list | local TEMPLATE_LIST = ROOT_PAGE .. '/templates' -- template config module list | ||
local TEMPLATE_ROOT = TEMPLATE_LIST .. '/' -- template config module prefix | local TEMPLATE_ROOT = TEMPLATE_LIST .. '/' -- template config module prefix | ||
local LINK_CONFIG = ROOT_PAGE .. '/links' -- link config module list | local LINK_CONFIG = ROOT_PAGE .. '/links/sandbox' -- link config module list | ||
local AUTODOC_SUFFIX = '/autodoc' | local AUTODOC_SUFFIX = '/autodoc' | ||
Line 140: | Line 140: | ||
ret[#ret + 1] = '|-' | ret[#ret + 1] = '|-' | ||
for i, header in ipairs(headers) do | for i, header in ipairs(headers) do | ||
ret[#ret + 1] = '! | ret[#ret + 1] = '! ' .. header | ||
end | end | ||
Line 147: | Line 147: | ||
ret[#ret + 1] = '|-' | ret[#ret + 1] = '|-' | ||
for j, cell in ipairs(row) do | for j, cell in ipairs(row) do | ||
ret[#ret + 1] = '| ' .. cell | |||
end | end | ||
end | end | ||
Line 163: | Line 159: | ||
local function grey(s) | local function grey(s) | ||
return string.format('<span style="color: gray;">%s</span>', s) | return string.format('<span style="color: gray;">%s</span>', s) | ||
end | |||
local function bold(s) | |||
return string.format("'''%s'''", s) | |||
end | end | ||
Line 208: | Line 208: | ||
-- Build the row. | -- Build the row. | ||
local row = { | local row = { | ||
code, | bold(code), | ||
linkData.description or grey("''No description available''"), | linkData.description or grey("''No description available''"), | ||
link, | link, | ||
Line 254: | Line 254: | ||
-- Build the row. | -- Build the row. | ||
local row = { | local row = { | ||
makeWikilink(mw.site.namespaces[10].name .. ':' .. template, template), | bold(makeWikilink(mw.site.namespaces[10].name .. ':' .. template, template)), | ||
templateData.description or grey("''No description available''"), | templateData.description or grey("''No description available''"), | ||
example, | example, |