Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
m>Jackmcbarn m check id |
m>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 | ||