fbpx
วิกิพีเดีย

มอดูล:Comma separated entries

คู่มือการใช้งานมอดูล[สร้าง]
local p = {}  local function _main( args )  local sep = mw.message.new( 'comma-separator' ):plain()  return table.concat( args, sep ) end  function p.main( frame )  local origArgs  if frame == mw.getCurrentFrame() then  -- We're being called via #invoke. If the invoking template passed any arguments,  -- use them. Otherwise, use the arguments that were passed into the template.  origArgs = frame:getParent().args  for k, v in pairs( frame.args ) do  origArgs = frame.args  break  end  else  -- We're being called from another module or from the debug console, so assume  -- the arguments are passed in directly.  origArgs = frame  end   -- Use integer args only, and allow for explicit positional arguments  -- that are specified out of order, e.g. {{br separated entries|3=entry3}}.  -- After processing, the args can be accessed accurately from ipairs.  local args = {}  for k, v in pairs( origArgs ) do  if type( k ) == 'number'  and k >= 1  and math.floor( k ) == k  and mw.ustring.match( v, '%S' ) -- Remove blank or whitespace values.  then  table.insert( args, k )  end  end  table.sort( args )  for i,v in ipairs( args ) do  args[ i ] = origArgs[ v ]  -- Trim whitespace from all args.  if type( args[ i ] ) == 'string' then  args[ i ] = mw.text.trim( args[ i ] )  end  end   return _main( args ) end  return p 

มอด, comma, separated, entries, เป, นมอด, ลท, กป, องก, นถาวรเน, องจากม, ความเส, ยงส, งกร, ณาอภ, ปรายการเปล, ยนแปลงใด, ทางหน, าค, ณอาจส, งคำขอแก, ไข, ไปย, งผ, แลระบบเพ, อให, แก, ไขได, หากเป, นการแก, ไขท, ไม, การค, ดค, านหร, อม, ความเห, นพ, องสน, บสน, ณย, งสามาร. niepnmxdulthithukpxngknthawrenuxngcakmikhwamesiyngsungkrunaxphipraykarepliynaeplngid thanghnakhuy khunxacsngkhakhxaekikh ipyngphuduaelrabbephuxihaekikhidhakepnkaraekikhthiimmikarkhdkhanhruxmikhwamehnphxngsnbsnun khunyngsamarthkhxihelikpxngknhnaidkhumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulnilocal p local function main args local sep mw message new comma separator plain return table concat args sep end function p main frame local origArgs if frame mw getCurrentFrame then We re being called via invoke If the invoking template passed any arguments use them Otherwise use the arguments that were passed into the template origArgs frame getParent args for k v in pairs frame args do origArgs frame args break end else We re being called from another module or from the debug console so assume the arguments are passed in directly origArgs frame end Use integer args only and allow for explicit positional arguments that are specified out of order e g br separated entries 3 entry3 After processing the args can be accessed accurately from ipairs local args for k v in pairs origArgs do if type k number and k gt 1 and math floor k k and mw ustring match v S Remove blank or whitespace values then table insert args k end end table sort args for i v in ipairs args do args i origArgs v Trim whitespace from all args if type args i string then args i mw text trim args i end end return main args end return p ekhathungcak https th wikipedia org w index php title mxdul Comma separated entries amp oldid 5403826, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม