Content deleted Content added
update the p.linktable function to use the new links table |
take the easy way out - copy all the links into the links table, then use next on that |
||
Line 59:
end
return extraLinkFunctions
end
local function addExtraLink(code, func)
if success and type(link) == 'string' then
end
Line 78 ⟶ 85:
local extraLinkFunction = extraLinkFunctions[code]
if type(extraLinkFunction) == 'function' then
▲ links[code] = link
end
end
Line 86 ⟶ 92:
end,
__pairs = function ()
return function (t, key)▼
for code, func in pairs(extraLinkFunctions) do
▲ local link = linkFunction(snippets)
addExtraLink(code, func)
links[nextBuiltInKey] = link▼
return nextBuiltInKey, link▼
▲ extraLinkFunctions = getExtraLinkFunctions()
▲ if extraLinkFunctions then
▲ if validateCode(nextKey) and type(extraLinkFunction) == 'function' then
local link = extraLinkFunction(snippets)▼
▲ end
end
end
end
-- Allow built-in functions to overwrite extra functions.
for code, func in pairs(linkFunctions) do
end
▲ return function (t, key)
end
end
|