fun emit(out: SpannableStringBuilder?, root: Block) { root.removeSurroundingEmptyLines() when (root.type) { NONE -> {} javax.accessibility.AccessibleRole.PARAGRAPH -> this.config.decorator.openParagraph(out) javax.swing.text.html.HTML.Tag.BLOCKQUOTE -> this.config.decorator.openBlockquote(out) UNORDERED_LIST -> this.config.decorator.openUnorderedList(out) ORDERED_LIST -> this.config.decorator.openOrderedList(out) UNORDERED_LIST_ITEM -> this.config.decorator.openUnOrderedListItem(out) ORDERED_LIST_ITEM -> this.config.decorator.openOrderedListItem(out) } if (root.hasLines()) { this.emitLines(out, root) } else { var block: Block = root.blocks while (block != null) { emit(out, block) block = block.next } } when (root.type) { NONE -> {} javax.accessibility.AccessibleRole.PARAGRAPH -> this.config.decorator.closeParagraph(out) javax.swing.text.html.HTML.Tag.BLOCKQUOTE -> this.config.decorator.closeBlockquote(out) UNORDERED_LIST -> this.config.decorator.closeUnorderedList(out) ORDERED_LIST -> this.config.decorator.closeOrderedList(out) UNORDERED_LIST_ITEM -> this.config.decorator.closeUnOrderedListItem(out) ORDERED_LIST_ITEM -> this.config.decorator.closeOrderedListItem(out) } }
Transforms the given block recursively into HTML .