Module:Sandbox/trappist the monk/template compare explained

--

require('strict');

----------------------------< T E M P L A T E _ P A R A M S _ G E T >----------------------------------------

gets parameters used by template from unparsed template wikitext and adds each to param_list.

returns true on success; false when template does not exist

local function template_params_get (template, param_list) local content = mw.title.new (template):getContent; -- get unparsed wikitext from the template if not content then return false; -- announce failure end

for param in content:gmatch ('