Jump to content

Module:Cite and Module:Cite/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
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 returns a function that calls cite() with the KEY name
return function (frame) return cite (frame, template) end; -- which in turn return a function which calls cite() with the KEY name
end
end
})
})