Modul:Common: Unterschied zwischen den Versionen

Export function mit setmetatable eingeführt
Keine Bearbeitungszusammenfassung
(Export function mit setmetatable eingeführt)
Markierung: Zurückgesetzt
Zeile 1: Zeile 1:
local p = {}
local p = {}
local export = {} -- functions for #invoke


function p.AttributeTable(args)
function p.AttributeTable(args)
Zeile 13: Zeile 14:
end
end


function p.istJahrestag(frame)
function export.istJahrestag(frame)
local args = frame.args
local args = frame.args
     local title = mw.title.getCurrentTitle().text
     local title = mw.title.getCurrentTitle().text
Zeile 31: Zeile 32:
end
end


function p.istJahreszahl(frame)
function export.istJahreszahl(frame)
     local args = frame.args
     local args = frame.args
     local title = mw.title.getCurrentTitle().text
     local title = mw.title.getCurrentTitle().text
Zeile 48: Zeile 49:
end
end


function p.getPageName(frame)
function export.getPageName(frame)
-- This is for unlinking semantic attributes with datatype site.
-- This is for unlinking semantic attributes with datatype site.
local p = frame.args[1] or ""
local p = frame.args[1] or ""
Zeile 136: Zeile 137:
end
end


function p.spaces(frame)
function export.spaces(frame)
local n = tonumber(frame.args[1])
local n = tonumber(frame.args[1])
local s = ""
local s = ""
Zeile 185: Zeile 186:
end
end


return p
-- export for #invoke, p for require
return setmetatable(export, {__call = function() return p end})
82.367

Bearbeitungen