require('strict')local p =
--lang_xx_settings|template=}}
Reads the content of the template and extracts the parameters from for display on the template'sdocumentation page.
local function lang_xx_settings(frame) local page = mw.title.makeTitle('Template', frame.args['template'] or frame.args[1]) -- get a page object for this page in 'Template:' namespace if not page then return -- TODO: error message? end
local content = page:getContent -- get unparsed content if not page then return -- TODO: error message? end
local out =
local params local style
if content:match('}') or content:match('}') then -- if this template uses params = content:match('}') or content:match('}') -- extract the #invoke:'s parameters if not params then return -- there should be at least one or the template/module won't work TODO: error message? end table.insert(out, '
--uses_module|template=}}
Reads the content of the template to determine if this template uses Module:Lang.Returns the index of the substring '