convertTableOfContentsToListNode
fun convertTableOfContentsToListNode(view: TableOfContentsView, renderer: NodeVisitor<CharSequence>, items: List<TableOfContents.Item>, loose: Boolean = true, wrapLinksInParagraphs: Boolean = false, linkUrlMapper: (TableOfContents.Item) -> String): OrderedList
Converts a table of contents to a renderable OrderedList.
Parameters
renderer
renderer to use to render items
items
ToC items view contains, prior to filtering
loose
whether the list should be rendered in loose mode
wrapLinksInParagraphs
whether to wrap the links in paragraphs
linkUrlMapper
function that obtains the URL to send to when a ToC item is interacted with