Module:Anchor: Difference between revisions

Content added Content deleted
en>Centrist16
(Created page with "-- This module implements {{anchor}}. local getArgs = require('Module:Arguments').getArgs local tableTools = require('Module:TableTools') local p = {} function p.main(frame...")
en>Pppery
(Add class per edit request)
Line 19: Line 19:
local ret = {}
local ret = {}
for _, anchor in ipairs(anchors) do
for _, anchor in ipairs(anchors) do
ret[#ret + 1] = '<span id="' .. anchor .. '"></span>'
ret[#ret + 1] = '<span class="anchor" id="' .. anchor .. '"></span>'
end
end
return table.concat(ret)
return table.concat(ret)