-- This module implements [[Template:Alternating rows table section]]localp={}functionp._buildrows(args)localostyle=args['os']and' style="'..args['os']..'"'or''localestyle=args['es']and' style="'..args['es']..'"'or''--local lang = mw.getContentLanguage() -- to convert numbers to Persianlocalrownums={}fork,_inpairs(args)dolocali=tonumber(tostring(k):match('^%s*([%d]+)%s*$')or'0')if(i>0)thentable.insert(rownums,i)endend-- sort the row numberstable.sort(rownums)localres={}fork,idxinipairs(rownums)dotable.insert(res,'|-'..((k%2==0)andestyleorostyle))table.insert(res,args[idx])endreturnresendfunctionp.main(frame)localgetArgs=require('Module:Arguments').getArgslocalargs=getArgs(frame,{parentFirst=true})returntable.concat(p._buildrows(args),'\n')endreturnp