Module:nyms

Revision as of 11:18, 11 August 2023 by Maria (talk | contribs) (Created page with "local export = {} local m_links = require("Module:links") function export.make_nym_list(data) local links = {} for _, term in ipairs(data.terms) do table.insert(links, m_links.full_link{term = term, language = data.language}) end local out = '<span class="nyms-toggle" data-label="' .. data.label .. '"></span>' out = out .. '<dl><dd><span class="nyms">' out = out .. '<span class="nyms-label">' .. data.label .. '</span>' out = out .. table.concat(links, ", ") o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:nyms/documentation

local export = {}

local m_links = require("Module:links")

function export.make_nym_list(data)
	local links = {}
	for _, term in ipairs(data.terms) do
		table.insert(links, m_links.full_link{term = term, language = data.language})
	end
	local out = '<span class="nyms-toggle" data-label="' .. data.label .. '"></span>'
	out = out .. '<dl><dd><span class="nyms">'
	out = out .. '<span class="nyms-label">' .. data.label .. '</span>'
	out = out .. table.concat(links, ", ")
	out = out .. '</span></dd></dl>'
	return out
end

return export