Module:Util/markup/listBulleted

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search

listBulleted(items)

Returns

  • A bulleted list (ul).

Examples

#InputOutputResultStatus
1
listBulleted({"foo", "bar", "baz"})
"<ul><li>foo</li><li>bar</li><li>baz</li></ul>"
  • foo
  • bar
  • baz

local function listBulleted(items)
	if not items then
		return ""
	end
	local ul = mw.html.create("ul")
	for i, v in ipairs(items) do
		ul:tag("li"):wikitext(v)
	end
	return tostring(ul)
end

return listBulleted