Jump to content

Wiki/Module:Footnote

From WikiGence
Revision as of 03:39, 27 October 2025 by Wikigence (talk | contribs) (Created page with "local p = {} local function makeRef(args) local content = args[1] or '' local name = args.name local group = args.group local ref = args.ref local tag = 'ref' local out = '<' .. tag if name and name ~= '' then out = out .. ' name="' .. name .. '"' end if group and group ~= '' then out = out .. ' group="' .. group .. '"' end out = out .. '>' if ref and ref ~= '' then out = out .. ref elseif content and content ~= '' then out = out .. content end...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

local function makeRef(args) local content = args[1] or local name = args.name local group = args.group local ref = args.ref local tag = 'ref'

local out = '<' .. tag if name and name ~= then out = out .. ' name="' .. name .. '"' end if group and group ~= then out = out .. ' group="' .. group .. '"' end out = out .. '>'

if ref and ref ~= then out = out .. ref elseif content and content ~= then out = out .. content end

out = out .. '</' .. tag .. '>' return out end

function p.efn(frame) local args = frame:getParent().args return makeRef(args) end

function p.refn(frame) local args = frame:getParent().args return makeRef(args) end

function p.notelist(frame) local args = frame:getParent().args local group = args.group or 'note' local refs = args.refs or return '' end

return p