RtfToAnnotatedString
Builds a Compose AnnotatedString from an RTF document. Tracks bold (Command.b), italic (Command.i), underline (Command.ul) and strikethrough (Command.strike) and applies the matching SpanStyle to each body-text run. Body-text filtering matches com.darkrockstudios.libs.rtfparserkmp.converter.RtfToMarkdown: only Command.rtf, Command.pntext and Command.fldrslt destinations contribute text.
Command.par, Command.line and Command.row yield a newline; Command.tab yields a tab.
Character formatting is group-scoped: a snapshot of the formatting state is pushed at each group start and restored at the matching group end, mirroring how RTF braces scope formatting (e.g. {\b bold} resets bold at the }). Explicit \b0/\i0/\ul0/\ulnone toggles still mutate the current state within a group.
Functions
Closes any open span and returns the accumulated AnnotatedString; call after parsing finishes.