Module:Documentation: Difference between revisions

Only load Module:Module wikitext if it's actually needed
(bring in usage of Module:Module wikitext from sandbox)
(Only load Module:Module wikitext if it's actually needed)
Line 4: Line 4:
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
local messageBox = require('Module:Message box')
local moduleWikitext = require('Module:Module wikitext').main


-- Get the config table.
-- Get the config table.
Line 332: Line 331:
if currentTitle.contentModel ~= 'Scribunto' then return end
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
return moduleWikitext()
local moduleWikitext =  package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
end


Anonymous user