Modul:Vorlage:Anker: Unterschied zwischen den Versionen

657 Bytes hinzugefügt ,  3. Juli 2020
K
13 Versionen importiert: Doku-Vorlage
(2020-01-31)
K (13 Versionen importiert: Doku-Vorlage)
 
(2 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
local Anchors = { suite  = "Anchors",
local Anchors = { suite  = "Anchors",
                   serial  = "2020-01-31",
                   serial  = "2020-04-10",
                   item    = 79414611,
                   item    = 79414611,
                   globals = { Multilingual = 47541920,
                   globals = { Multilingual = 47541920,
Zeile 21: Zeile 21:
                       "content",
                       "content",
                       "contentSub",
                       "contentSub",
                      "contentSub2",
                       "editform",
                       "editform",
                       "editpage-copywarn",
                       "editpage-copywarn",
Zeile 33: Zeile 34:
                       "siteSub",
                       "siteSub",
                       "toc",
                       "toc",
                      "toctitle",
                       "top",
                       "top",
                       "wikiPreview" },
                       "wikiPreview" },
Zeile 38: Zeile 40:
                       "^ca%-[%l%-]+$",
                       "^ca%-[%l%-]+$",
                       "^n%-[%l%-]+$",
                       "^n%-[%l%-]+$",
                       "^p%-[%a%-]+$",
                       "^p%-%a%a[%a%-]+$",
                       "^pt%-[%l%-]+$",
                       "^pt%-[%l%-]+$",
                       "^wp%u" },
                       "^wp%u" },
Zeile 67: Zeile 69:
     -- Postcondition:
     -- Postcondition:
     --    Returns whatever, probably table
     --    Returns whatever, probably table
     -- 2019-10-29
     -- 2020-01-01
     local storage = access
     local storage = access
     local finer = function ()
     local finer = function ()
Zeile 102: Zeile 104:
         end
         end
         if not lucky and alert then
         if not lucky and alert then
             error( "Missing or invalid page: " .. storage, 0 )
             error( "Missing or invalid page: " .. storage )
         end
         end
     end
     end
Zeile 257: Zeile 259:


local function features( adapt )
local function features( adapt )
     -- Set #invoke parameters on compliance
     -- Set parameters on compliance
     if type( adapt ) == "table" then
     if type( adapt ) == "table" then
         Config.limitMarkup = faculty( adapt.rejectMarkup )
         Config.limitMarkup = faculty( adapt.rejectMarkup )
Zeile 424: Zeile 426:
                     if r1  and  s:match( "%%%x%x" ) then
                     if r1  and  s:match( "%%%x%x" ) then
                         r1 = false
                         r1 = false
                    end
                    if r1 then
                        for k = 1, #Config.globalPatterns do
                            if s:match( Config.globalPatterns[ k ] ) then
                                r1 = false
                                break    -- k = 1, #Config.globalPatterns
                            end
                        end -- k = 1, #Config.globalPatterns
                     end
                     end
                 end
                 end
Zeile 510: Zeile 520:
     return r
     return r
end -- p.f()
end -- p.f()
p.feasible = function ( frame )
    local r1, r2
    Config.frame = frame
    features( frame.args )
    r1, r2 = Anchors.feasible( frame.args[ 1 ] )
    return r1 or ""
end -- p.feasible()


p.forbidden = function ()
p.forbidden = function ()