Module:Cite and Module:Cite/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
simplify |
move up a line to make comments clearer |
||
Line 1: | Line 1: | ||
require ('strict'); |
require ('strict'); |
||
local cfg = mw.loadData ('Module:Cite/config'); |
local cfg = mw.loadData ('Module:Cite/config/sandbox'); |
||
Line 67: | Line 67: | ||
return setmetatable({}, {__index = -- returns an empty TABLE whose metatable has the __index set so that, for any given KEY, it returns |
return setmetatable({}, {__index = -- returns an empty TABLE whose metatable has the __index set so that, for any given KEY, it returns |
||
function(_, template) -- this anonymous function called as function(TABLE, KEY) |
function(_, template) -- this anonymous function called as function(TABLE, KEY) |
||
return function (frame) return cite (frame, template) end; -- which in turn |
return function (frame) return cite (frame, template) end; -- which in turn return a function which calls cite() with the KEY name |
||
end |
end |
||
}) |
}) |