Difference between revisions of "Module:Documentation"

Jump to navigation Jump to search
ugly hack so that expanding of the /doc subpage doesn't count against Lua's time limit
en>Jackmcbarn
m (check id)
en>Jackmcbarn
(ugly hack so that expanding of the /doc subpage doesn't count against Lua's time limit)
Line 646: Line 646:
env = env or p.getEnvironment(args)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local docTitle = env.docTitle
local content = args.content
local content = args.content or args._content
if not content and docTitle and docTitle.exists then
if not content and docTitle and docTitle.exists then
local frame = mw.getCurrentFrame()
local frame = mw.getCurrentFrame()
Line 654: Line 654:
-- of docs are interpreted correctly.
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'  
return '\n' .. (content or '') .. '\n'  
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
end


Anonymous user

Navigation menu