首页
随机
登录
设置
关于二次元百科
免责声明
二次元百科
搜索
查看“︁Module:Anchor”︁的源代码
←
Module:Anchor
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
--模塊嵌入{{anchor}} local getArgs = require('Module:Arguments').getArgs local tableTools = require('Module:TableTools') local p = {} function p.main(frame) -- Get the positional arguments from #invoke, remove any nil values, -- and pass them to p._main. local args = getArgs(frame) local argArray = tableTools.compressSparseArray(args) return p._main(unpack(argArray)) end function p._main(...) -- Generate the list of anchors. local anchors = {...} local ret = {} for _, anchor in ipairs(anchors) do ret[#ret + 1] = '<span class="anchor" id="' .. anchor .. '"></span>' end return table.concat(ret) end return p
该页面使用的模板:
Module:Anchor/doc
(
查看源代码
)
返回
Module:Anchor
。