Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.

Änderungen

Zur Navigation springen Zur Suche springen
883 Bytes hinzugefügt ,  10:47, 6. Apr. 2018
2018-04-05
Zeile 1: Zeile 1:  
local TemplateData = { suite  = "TemplateData",
 
local TemplateData = { suite  = "TemplateData",
                       serial = "2018-04-03",
+
                       serial = "2018-04-05",
 
                       item  = 46997995 }
 
                       item  = 46997995 }
 
--[=[
 
--[=[
Zeile 1.265: Zeile 1.265:  
         if source:find( "|", 1, true ) then
 
         if source:find( "|", 1, true ) then
 
             local scan = "^[\n ]*%{%{[\n _]*|[\n _]*=[\n _]*%}%}[\n ]*$"
 
             local scan = "^[\n ]*%{%{[\n _]*|[\n _]*=[\n _]*%}%}[\n ]*$"
             if source:match( scan, 1, true ) then
+
             if source:match( scan ) then
 
                 code = source:gsub( "\n", "N" )
 
                 code = source:gsub( "\n", "N" )
 
             else
 
             else
Zeile 1.286: Zeile 1.286:  
                   support == "*" then
 
                   support == "*" then
 
                     Permit.builder[ s ] = true
 
                     Permit.builder[ s ] = true
 +
                elseif s:match( "^[1-9]%d*" ) and
 +
                      Permit.builder.align then
 +
                    Permit.builder.align = tonumber( s )
 
                 else
 
                 else
 
                     if unknown then
 
                     if unknown then
Zeile 1.343: Zeile 1.346:  
                         space = " "
 
                         space = " "
 
                     end
 
                     end
                     if Permit.builder.align == true then
+
                     if Permit.builder.align then
                        if type( Data.got ) == "table"  and
+
                        local n
                          type( Data.got.params ) == "table" then
+
                        s = " align"
                            local n = 0
+
                        if Permit.builder.align == true then
                            for k, v in pairs( Data.got.params ) do
+
                            n = 0
                                if type( v ) == "table"  and
+
                            if type( Data.got ) == "table"  and
                                  not v.deprecated  and
+
                              type( Data.got.params ) == "table" then
                                  type( k ) == "string" then
+
                                for k, v in pairs( Data.got.params ) do
                                    k = mw.ustring.len( k )
+
                                    if type( v ) == "table"  and
                                    if k > n then
+
                                      not v.deprecated  and
                                        n = k
+
                                      type( k ) == "string" then
 +
                                        k = mw.ustring.len( k )
 +
                                        if k > n then
 +
                                            n = k
 +
                                        end
 
                                     end
 
                                     end
                                 end
+
                                 end -- for k, v
                            end -- for k, v
+
                            end
                             if n > 1 then
+
                        else
                                 spaced = string.rep( "_", n ) .. " "
+
                            n = Permit.builder.align
 +
                             if type( n ) == "number"  and  n > 1 then
 +
                                 s = string.format( "%s %d", s, n )
 +
                            else
 +
                                n = 0    -- How comes?
 
                             end
 
                             end
 
                         end
 
                         end
                         show = show .. " align"
+
                        if n > 1 then
 +
                            spaced = string.rep( "_", n ) .. " "
 +
                        end
 +
                         show = show .. s
 
                     elseif Permit.builder.after == true then
 
                     elseif Permit.builder.after == true then
 
                         spaced = ""
 
                         spaced = ""
Zeile 1.464: Zeile 1.478:  
     if Data.shared then
 
     if Data.shared then
 
         local global = mw.html.create( "div" )
 
         local global = mw.html.create( "div" )
 +
                              :attr( "id", "templatedata-global" )
 
         local shift
 
         local shift
 
         if TemplateData.ltr then
 
         if TemplateData.ltr then
Zeile 1.573: Zeile 1.588:  
         source = arglist.JSON
 
         source = arglist.JSON
 
     elseif arglist.Global then
 
     elseif arglist.Global then
         source = TemplateData.getGlobalJSON( arglist.Global )
+
         source = TemplateData.getGlobalJSON( arglist.Global,
 +
                                            arglist.Local )
 
     elseif arglist[ 1 ] then
 
     elseif arglist[ 1 ] then
 
         local s    = mw.text.trim( arglist[ 1 ] )
 
         local s    = mw.text.trim( arglist[ 1 ] )
Zeile 1.654: Zeile 1.670:       −
TemplateData.getGlobalJSON = function ( access )
+
TemplateData.getGlobalJSON = function ( access, adapt )
     -- Retrieve JSON from a global repository
+
     -- Retrieve TemplateData from a global repository (JSON)
 
     -- Parameter:
 
     -- Parameter:
 
     --    access  -- string, with page specifier (on WikiMedia Commons)
 
     --    access  -- string, with page specifier (on WikiMedia Commons)
 +
    --    adapt  -- JSON string or table with local overrides
 
     -- Returns true, if succeeded
 
     -- Returns true, if succeeded
 
     local plugin = Fetch( "/global" )
 
     local plugin = Fetch( "/global" )
Zeile 1.663: Zeile 1.680:  
     if type( plugin ) == "table"  and
 
     if type( plugin ) == "table"  and
 
       type( plugin.fetch ) == "function" then
 
       type( plugin.fetch ) == "function" then
         local s, got = plugin.fetch( access )
+
         local s, got = plugin.fetch( access, adapt )
 
         if got then
 
         if got then
 
             Data.got    = got
 
             Data.got    = got
Cookies helfen uns bei der Bereitstellung von imedwiki. Durch die Nutzung von imedwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.

Navigationsmenü