Module:FilterBuilder

local p = {}

function p.filterBuilder(frame) local dataKey = mw.text.trim(frame.args[1]) local dataValues = mw.text.split(frame.args[2], ",") local contentValues = mw.text.split(frame.args[3], ",") local filterGroup = mw.html.create('div') :addClass('mw-ui-button-group') :addClass('filter-group-' .. dataKey) :css('margin', '3px 1px') for i,value in ipairs(dataValues) do		filterGroup:tag('div') :addClass('mw-ui-button') :addClass('filter-button') :attr('data-key', dataKey) :attr('data-value', string.lower(mw.text.trim(value))) :css('height', 'auto') :wikitext(contentValues[i]) end return tostring(filterGroup) end

return p