 local pu800 local separators dotu800 true pipe true comma true 'tptu800 languages true local function getseparator sepu800 ifu800 type sepu800 'string' then return nilu800 endu800 ifu800 separators sepu800 then return mwu800u82emessageu82enewu800 sepu800 .. ' separator' plain else return sepu800 endu800 endu800 local function generatelink page nspace delim enddelim ifu800 notu800 page then return nilu800 endu800 local pagename mwu800u82etitleu82enewu800 page ifu800 notu800 pagename then default tou800 theu800 args weu800 were passed ifu800 ouru800 page object wasu800 nilu800. pagename page else pagename pagenameu82etext endu800 delim delim oru800   enddelim enddelim oru800 delim nspace nspace oru800   ifu800 nspace 'allu800' then nspace   pagename page endu800 local outstr mwu800u82eustringu82egsub stringu82eformat ' su800 su800 su800 su800 su800' delim nspace pagename page enddelim ' ' ' ' return outstr endu800 function pu800u82e_main args local tu800 local separator getseparator argsu82eseparator local conjunction getseparator argsu82econjunction foru800 iu800 vu800 inu800 ipairs args dou800 tableu82einsert tu800 generatelink vu800 argsu82enspace argsu82edelim argsu82eedelim endu800 return mwu800u82etextu82elisttotext tu800 separator conjunction endu800 function pu800u82emain frame local origargs require 'module arguments .getargs frame trim false removeblanks false wrappers 'template pagelist' process integer args. allow foru800 explicit positional arguments that areu800 specified outu800 ofu800 order eu800u82egu800. bru800 separated entries 3u800 entry3 . after processing theu800 args canu800 beu800 accessed accurately from ipairs. local args foru800 ku800 vu800 inu800 pairs origargs dou800 ifu800 type ku800 'number' andu800 ku800 1u800 andu800 mathu82efloor ku800 ku800 andu800 stringu82ematch vu800 ' su800' then remove blank oru800 whitespace values. tableu82einsert args ku800 endu800 endu800 tableu82esort args foru800 iu800 vu800 inu800 ipairs args dou800 args iu800 origargs vu800 trim whitespace. ifu800 type args iu800 'string' then args iu800 mwu800u82etextu82etrim args iu800 endu800 endu800 getu800 oldu800 named args. weu800 donu800'tu800 need tou800 remove blank values asu800 foru800 theu800 nspace andu800 edelim parameters theu800 behaviour isu800 different depending onu800 whether theu800 parameters areu800 blank oru800 absent andu800 foru800 theu800 delim parameter theu800 default should beu800 theu800 blank string anyway. argsu82edelim origargsu82edelim argsu82eedelim origargsu82eedelim argsu82enspace origargsu82enspace getu800 newu800 named args "separator" andu800 "conjunction" andu800 strip blank values. ifu800 origargsu82eseparator andu800 origargsu82eseparator   then argsu82eseparator origargsu82eseparator endu800 ifu800 origargsu82econjunction andu800 origargsu82econjunction   then argsu82econjunction origargsu82econjunction endu800 return pu800u82e_main args endu800 return pu800 