encloseHtml

fun encloseHtml(builder: StringBuilder, action: StringBuilder.() -> Unit)

Write the open tags, run the action on the builder, then write the close tags. Do not write the outer "html" open/close tags. The resulting HTML should present a reasonable facsimile of the corresponding document styling.

Parameters

builder

Where to write the HTML.

action

The function that produces the text inside the HTML tags.