Modul:TemplateBox: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
184 Bytes hinzugefügt ,  10:15, 20. Sep. 2021
Fullfilling my edit request: Ensure that integer keys are always visited in ascending order
K (1 Version importiert)
StadtbahnBI>ExE Boss
(Fullfilling my edit request: Ensure that integer keys are always visited in ascending order)
Zeile 305: Zeile 305:
     sep = sep .. sepStart
     sep = sep .. sepStart
      
      
    local sparseIpairs = require('Module:TableTools').sparseIpairs
     local comapareLegacyVal = function(val)
     local comapareLegacyVal = function(val)
         return val == 'optional-' or val == 'deprecated'
         return val == 'optional-' or val == 'deprecated'
Zeile 318: Zeile 319:
      
      
     eachArg = function(cb)
     eachArg = function(cb)
         for i, arg in pairs( pargs ) do
         for i, arg in sparseIpairs( pargs ) do
             if ('number' == type(i)) then
             if ('number' == type(i)) then
                 argName = mw.text.trim( arg or '' )
                 argName = mw.text.trim( arg or '' )
Zeile 565: Zeile 566:
     end
     end
     if processParams then
     if processParams then
        -- Ensure that `templateArgs` contains indicies in ascending order
        table.sort( templateArgs )
         for i, number in pairs( templateArgs ) do
         for i, number in pairs( templateArgs ) do
             extractData( paraminfoTLParams, number )
             extractData( paraminfoTLParams, number )
Anonymer Benutzer

Navigationsmenü