Module:Documentation: Difference between revisions

bring in usage of Module:Module wikitext from sandbox
m (160 revisions imported from templatewiki:Module:Documentation)
(bring in usage of Module:Module wikitext from sandbox)
Line 4:
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
local moduleWikitext = require('Module:Module wikitext').main
 
-- Get the config table.
Line 129 ⟶ 130:
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
Line 323 ⟶ 325:
-- Auxiliary templates
----------------------------------------------------------------------------
 
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
 
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
return moduleWikitext()
end
 
function p.sandboxNotice(args, env)
Anonymous user