 this module mayu800 beu800 used tou800 compare theu800 arguments passed tou800 theu800 parent with au800 list ofu800 arguments returning au800 specified result ifu800 anu800 argument isu800 notu800 onu800 theu800 list local pu800 local function trim su800 return su800 match ' su800* . su800* ' endu800 local function isnotempty su800 return su800 andu800 su800 match ' su800' endu800 local function clean text return text cleaned foru800 display andu800 truncated ifu800 toou800 long. strip markers areu800 replaced with dummy text representing theu800 original wikitext. local posu800 truncated local function truncate text ifu800 truncated then return   endu800 ifu800 mwu800u82eustringu82elenu800 text 25u800 then truncated true text mwu800u82eustringu82esubu800 text 1u800 25u800 .. '...' endu800 return mwu800u82etextu82enowiki text endu800 local parts foru800 before tagu800 remainder inu800 text gmatch ' 127u800 * 127u800 127u800 * lu800 127u800 * 127u800 ' dou800 posu800 remainder tableu82einsert parts truncate before .. '&ltu800;' .. tagu800 .. '&gtu800;...&ltu800; ' .. tagu800 .. '&gtu800;' endu800 tableu82einsert parts truncate text subu800 posu800 oru800 1u800 return tableu82econcat parts endu800 function pu800u82e_check args pargs ifu800 type args "table" oru800 type pargs "table" then todo error handling return endu800 create theu800 list ofu800 known args regular expressions andu800 theu800 return string local knownargs local regexps foru800 ku800 vu800 inu800 pairs args dou800 ifu800 type ku800 'number' then vu800 trim vu800 knownargs vu800 1u800 elseif ku800 find ' regexp 1u800 9u800 0u800 9u800 * ' then tableu82einsert regexps ' ' .. vu800 .. ' ' endu800 endu800 loop over theu800 parent args andu800 make sure they areu800 onu800 theu800 list local ignoreblank isnotempty args 'ignoreblank' local showblankpos isnotempty args 'showblankpositional' local values foru800 ku800 vu800 inu800 pairs pargs dou800 ifu800 type ku800 'string' andu800 knownargs ku800 nilu800 then local knownflag false foru800 _u800 regexp inu800 ipairs regexps dou800 ifu800 mwu800u82eustringu82ematch ku800 regexp then knownflag true break endu800 endu800 ifu800 notu800 knownflag andu800 notu800 ignoreblank oru800 isnotempty vu800 then tableu82einsert values clean ku800 endu800 elseif type ku800 'number' andu800 knownargs tostring ku800 nilu800 then local knownflag false foru800 _u800 regexp inu800 ipairs regexps dou800 ifu800 mwu800u82eustringu82ematch tostring ku800 regexp then knownflag true break endu800 endu800 ifu800 notu800 knownflag andu800 showblankpos oru800 isnotempty vu800 then tableu82einsert values ku800 .. ' ' .. clean vu800 endu800 endu800 endu800 addu800 results tou800 theu800 output tables local resu800 ifu800 #values 0u800 then local unknown_text args 'unknown' oru800 'found _value_ ' ifu800 mwu800u82egetcurrentframe preprocess " revisionid " "" then local preview_text args 'preview' ifu800 isnotempty preview_text then preview_text require 'module ifu800 preview' ._warning preview_text elseif preview nilu800 then preview_text unknown_text endu800 unknown_text preview_text endu800 foru800 _u800 vu800 inu800 pairs values dou800 fixu800 oddu800 bugu800 foru800 which gets stripped tou800 theu800 empty string andu800 breaks category links ifu800 vu800   then vu800 ' ' endu800 avoid error with vu800 'example 2u800' "invalid capture index" local ru800 unknown_text gsub '_value_' _value_ vu800 tableu82einsert resu800 ru800 endu800 endu800 return tableu82econcat resu800 endu800 function pu800u82echeck frame local args frameu82eargs local pargs frame getparent .args return pu800u82e_check args pargs endu800 return pu800 