-function OL(items, indent = 0, attributes = {}, itemAttributeGenerator = () => {}) {
- const spacer = '\t'.repeat(indent);
- return `${spacer}<ol${elementAttributes(attributes)}>
-${items.map((item) => LI(item, indent + 1, itemAttributeGenerator(item))).join('\n')}
-${spacer}</ol>`;
+
+/**
+ * Wrap a list of items in an unordered list.
+ * @param {string[]} items list item elements
+ * @param {number} indent indent level
+ * @param {object} attributes ul element attributes
+ * @param {ItemAttributeGenerator} itemAttributeGenerator function which returns attributes for a given list entry element
+ * @returns {string} ul element
+ */
+function UL(items, indent = 0, attributes = {}, itemAttributeGenerator = _defaultItemAttributeGenerator) {
+ return listContainer('ul', indent, attributes, items, itemAttributeGenerator);
+}
+
+
+/**
+ * Wrap a list of items in an ordered list.
+ * @param {string[]} items list item elements
+ * @param {number} indent indent level
+ * @param {object} attributes ol element attributes
+ * @param {ItemAttributeGenerator} itemAttributeGenerator function which returns attributes for a given liste entry element
+ * @returns {string} ol element
+ */
+function OL(items, indent = 0, attributes = {}, itemAttributeGenerator = _defaultItemAttributeGenerator) {
+ return listContainer('ol', indent, attributes, items, itemAttributeGenerator);