Difference between revisions of "Module:Infobox Task"

From Taskman Wiki
Jump to navigation Jump to search
(Created page with "local p = {}; function p.categorise(frame) local categories = frame:getParent().args[1] local ret = "Category:Tasks" for v in string.gmatch(ids, "([A-Za-z]+)") do...")
 
m
Line 4: Line 4:
 
   local categories = frame:getParent().args[1]
 
   local categories = frame:getParent().args[1]
 
   local ret = "[[Category:Tasks]]"
 
   local ret = "[[Category:Tasks]]"
   for v in string.gmatch(ids, "([A-Za-z]+)") do
+
   for v in string.gmatch(categories, "([A-Za-z]+)") do
 
     ret = ret .. "[[Category:" .. v .. "]]"
 
     ret = ret .. "[[Category:" .. v .. "]]"
 
   end
 
   end

Revision as of 15:14, 18 May 2020

Documentation for this module may be created at Module:Infobox Task/doc

local p = {};

function p.categorise(frame)
  local categories = frame:getParent().args[1]
  local ret = "[[Category:Tasks]]"
  for v in string.gmatch(categories, "([A-Za-z]+)") do
    ret = ret .. "[[Category:" .. v .. "]]"
  end
  return ret
end

return p