Module:documentation: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 8: Line 8:
return '\n<div style="margin-left:1em;">\n<i>This page has no documentation. Please <span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. ' create it]</span>.</i>\n</div>\n'
return '\n<div style="margin-left:1em;">\n<i>This page has no documentation. Please <span class="plainlinks">[' .. doc:fullUrl{action="edit"} .. ' create it]</span>.</i>\n</div>\n'
end
end
local doc_content = doc:getContent()
local doc_content = frame:expandTemplate{title=doc.fullText}
if doc_content == nil then
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_content or "") .. "\n</div>\n"
error("Documentation page exists but content is nil")
end
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