Modul:Vorlage:Anker: Unterschied zwischen den Versionen
2020-03-01
(2020-01-31) |
(2020-03-01) |
||
Zeile 1: | Zeile 1: | ||
local Anchors = { suite = "Anchors", | local Anchors = { suite = "Anchors", | ||
serial = "2020-01 | serial = "2020-03-01", | ||
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 67: | Zeile 69: | ||
-- Postcondition: | -- Postcondition: | ||
-- Returns whatever, probably table | -- Returns whatever, probably table | ||
-- | -- 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 | error( "Missing or invalid page: " .. storage ) | ||
end | end | ||
end | end | ||
Zeile 257: | Zeile 259: | ||
local function features( adapt ) | local function features( adapt ) | ||
-- Set | -- 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 () |