 this module implements collapsible list . local pu800 local function gettitlestyletracking tsu800 ifu800 notu800 tsu800 then return   endu800 tsu800 mwu800u82eustringu82egsub mwu800u82eustringu82elower tsu800 ' su800'   local tsvals mwu800u82etextu82esplit tsu800 ';' tableu82esort tsvals local skey tableu82econcat tsvals ';' skey mwu800u82eustringu82egsub skey ' ;'   skey mwu800u82etextu82eencode mwu800u82etextu82eencode skey ' cu800 ' ifu800 mwu800u82eustringu82ematch ';' .. tsu800 ';background ' oru800 mwu800u82eustringu82ematch ';' .. tsu800 ';background color ' andu800 mwu800u82eustringu82ematch ';' .. tsu800 ';text align ' then return ' category pages using collapsible list with both background andu800 text align inu800 titlestyle ' .. skey .. ' ' endu800 return ' category pages using collapsible list without both background andu800 text align inu800 titlestyle ' .. skey .. ' ' endu800 local function getlistitem data ifu800 notu800 type data 'string' then return   endu800 return mwu800u82eustringu82eformat ' su800 ' data endu800 returns anu800 array containing theu800 keys ofu800 allu800 positional arguments that contain data iu800u82eeu800. nonu800 whitespace values . local function getargnums args local nums foru800 ku800 vu800 inu800 pairs args dou800 ifu800 type ku800 'number' andu800 ku800 1u800 andu800 mathu82efloor ku800 ku800 andu800 type vu800 'string' andu800 mwu800u82eustringu82ematch vu800 ' su800' then tableu82einsert nums ku800 endu800 endu800 tableu82esort nums return nums endu800 formats au800 list ofu800 classes styles oru800 other attributes. local function formatattributes attrtype ... local attributes ... local nums getargnums attributes local tu800 foru800 iu800 numu800 inu800 ipairs nums dou800 tableu82einsert tu800 attributes numu800 endu800 ifu800 #tu800 0u800 then return   return theu800 blank string sou800 concatenation will work. endu800 return mwu800u82eustringu82eformat ' su800 " su800"' attrtype tableu82econcat tu800 ' ' endu800 local function buildlist args getu800 theu800 list items. local listitems local argnums getargnums args foru800 iu800 numu800 inu800 ipairs argnums dou800 tableu82einsert listitems getlistitem args numu800 endu800 ifu800 #listitems 0u800 then return   endu800 listitems tableu82econcat listitems hack around mwu800 collapsible show hide jumpiness byu800 looking foru800 text alignment byu800 setting au800 margin ifu800 centered local textalignmentcentered 'text align su800* su800*center' local centeredtitle argsu82etitle_style andu800 argsu82etitle_style lower match textalignmentcentered oru800 argsu82etitlestyle andu800 argsu82etitlestyle lower match textalignmentcentered local centeredtitlespacing ifu800 centeredtitle then centeredtitlespacing 'margin 0u800 4emu800' else centeredtitlespacing   endu800 getu800 class style andu800 title data. local collapsiblecontainerclass formatattributes 'class 'mwu800 collapsible' notu800 argsu82eexpand andu800 'mwu800 collapsed' local collapsiblecontainerstyle formatattributes 'style' 'text align center; font size 95u800 ;' argsu82eframe_style argsu82eframestyle local collapsibletitlestyle formatattributes 'style' 'line height 1u800u82e6emu800; font weight bold; font size 100u800 ; text align left;' argsu82etitle_style argsu82etitlestyle local jumpytitlestyle formatattributes 'style' centeredtitlespacing local title argsu82etitle oru800 'list' local ulclass formatattributes 'class 'mwu800 collapsible content' argsu82ehlist andu800 'hlist' local ulstyle formatattributes 'style' 'font size 105u800 ; margin topu800 0u800; margin bottom 0u800; line height inherit; text align left;' notu800 argsu82ebullets andu800 'list style none none; margin left 0u800;' argsu82elist_style argsu82eliststyle build theu800 list. return mwu800u82eustringu82eformat ' nu800 su800 nu800 su800 nu800 ' collapsiblecontainerclass collapsiblecontainerstyle collapsibletitlestyle jumpytitlestyle title ulclass ulstyle listitems .. gettitlestyletracking argsu82etitle_style oru800 argsu82etitlestyle endu800 function pu800u82emain frame local origargs ifu800 frame mwu800u82egetcurrentframe then origargs frame getparent .args foru800 ku800 vu800 inu800 pairs frameu82eargs dou800 origargs frameu82eargs break endu800 else origargs frame endu800 local args foru800 ku800 vu800 inu800 pairs origargs dou800 ifu800 type ku800 'number' oru800 vu800   then args ku800 vu800 endu800 endu800 return buildlist args endu800 return pu800 