Module:Template introspection: Difference between revisions
m update todo (wrapper is alraedy made) |
normalize arg names to snake case |
||
| Line 71: | Line 71: | ||
function p._template_introspection(args) | function p._template_introspection(args) | ||
local template_name = args[" | local template_name = args["template_name"] | ||
-- Get template wikitext | -- Get template wikitext | ||
| Line 96: | Line 96: | ||
-- Get template name, with namespace, and strip /doc if present | -- Get template name, with namespace, and strip /doc if present | ||
args[" | args["template_name"] = args["template_name"] or mw.title.getCurrentTitle().prefixedText | ||
args[" | args["template_name"] = args["template_name"]:gsub("/doc$", "") | ||
return p._template_introspection(args) | return p._template_introspection(args) | ||