Anonymous user
Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
get rid of the env:grab function
(use the err function for all the errors) |
(get rid of the env:grab function) |
||
Line 175:
local envFunc = envFuncs[key]
if envFunc then
local success, val =
env[key] = val -- Memoise the value.
return val
end
end
})
Line 231 ⟶ 232:
local title = env.title
local subpage = title.subpageText
if subpage == message('sandboxSubpage', 'string') or subpage == message('testcasesSubpage', 'string') then
else
end
if not ret then▼
end▼
▲ return ret
end
Line 265 ⟶ 261:
function envFuncs.sandboxTitle()
-- Title object for the /sandbox subpage.
if not title then▼
return title▼
end
function envFuncs.testcasesTitle()
-- Title object for the /testcases subpage.
return title▼
end
function envFuncs.printTitle()
-- Title object for the /Print subpage.
return title▼
return success, val▼
end
Line 381 ⟶ 357:
local data = {}
-- Get title objects.
local
return err(title)▼
▲ data.docTitle = docTitle
end
-- View, display, edit, and purge links if /doc exists.
Line 433 ⟶ 402:
function p.makeStartBoxData(args, env, links)
local subjectSpace = env.subjectSpace
local data = {}
Line 506 ⟶ 478:
function p._content(args, env)
-- Get the /doc title object
local
if not
end
-- Get the documentation content.
Line 532 ⟶ 504:
-- Get environment data.
local subjectSpace = env.subjectSpace
local
if not
return
end
Line 594 ⟶ 566:
function p.makePrintBlurb(args, env)
-- Get the /Print title object
local
if not
return
end
-- Make the print blurb.
Line 613 ⟶ 585:
function p.makeSubpagesBlurb(args, env)
-- Get the template title object
local
if not
end
-- Make the subpages blurb.
Line 634 ⟶ 606:
function p.makeCategoriesBlurb(args, env)
-- Get the title object.
local
if not
return
end
-- Make the blurb.
Line 645 ⟶ 617:
function p.makeDocPageBlurb(args, env)
-- Get the title object.
local
if not
return
end
-- Make the blurb.
Line 680 ⟶ 652:
local templatePage = env.templatePage
-- Get title objects.
local
if not templateTitle or not sandboxTitle or not testcasesTitle then
▲ local sandboxSuccess, sandboxTitle = env:grab('sandboxTitle')
▲ local testcasesSuccess, testcasesTitle = env:grab('testcasesTitle')
end
-- Make links.
|