span

fun span(text: String, block: TextScope.() -> Unit = {})

Appends a styled run.

Calls without a block reuse defaultSpanStyle verbatim. Calls with a block enter a TextScope (the same receiver as the regular text(...) DSL), so any property the user knows from there works here too — bold, italic, color, underline, etc.

Parameters

text

literal characters of this span. Pre-existing whitespace is preserved; newline characters split into hard lines just like in text.