10,731
edits
No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
function export.parse(term) | function export.parse(term) | ||
local args = {} | local args = {} | ||
for inline in mw.ustring.gmatch(term, "<([^>]+)>") do | |||
if mw.ustring.find(inline, "%:") then | |||
local arg, def = mw.ustring.match(inline, "^([^%:]+)%:([^%:]+)$") | |||
args[arg] = def | |||
else | |||
args[inline] = true | |||
end | |||
end | end | ||
return mw.ustring.gsub(term, "< | return mw.ustring.gsub(term, "<[^>]+>", ""), args | ||
end | end | ||
return export | return export |