2,788
edits
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
or mw.title.new(mw.title.getCurrentTitle().fullText .. "/documentation") | or mw.title.new(mw.title.getCurrentTitle().fullText .. "/documentation") | ||
if not doc.exists then | if not doc.exists then | ||
return '<div style="margin-left:1em;"><i>This page has no documentation. Please <span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. ' create it]</span>.</i></div>\n' | return '\n<div style="margin-left:1em;"><i>This page has no documentation. Please <span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. ' create it]</span>.</i></div>\n' | ||
end | end | ||
local doc_content = doc:getContent() | local doc_content = doc:getContent() | ||
Line 12: | Line 12: | ||
error("Documentation page exists but content is nil") | error("Documentation page exists but content is nil") | ||
end | end | ||
return '<div class="documentation">\n<i>The following documentation is located at [[' .. doc.fullText .. ']]. <sup><span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. " edit]</span></sup></i>\n\n" .. doc:getContent() .. "\n</div>\n" | return '\n<div class="documentation">\n<i>The following documentation is located at [[' .. doc.fullText .. ']]. <sup><span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. " edit]</span></sup></i>\n\n" .. doc:getContent() .. "\n</div>\n" | ||
end | end | ||
return export | return export |