Changes

no edit summary
Line 92: Line 92:  
end
 
end
 
local s = _.join(result, '\n')
 
local s = _.join(result, '\n')
s = s:gsub("{{([^|]+)|([^}]+)}}", function (template,argStr)
+
return frame:preprocess(s)
local args = {}
  −
for i,part in ipairs(mw.text.split(argStr,'|')) do
  −
if part:find('=') then
  −
a = mw.text.split(part,'=')
  −
args[a[1]] = a[2]
  −
else
  −
table.insert(args, part)
  −
end
  −
end
  −
return frame:expandTemplate{title=template, args=args}
  −
end)
  −
return s
   
end
 
end
  
5,354

edits