halilozercan / compose-richtext

A collection of Compose libraries for advanced text formatting and alternative display types.
https://halilibo.com/compose-richtext
Apache License 2.0
787 stars 65 forks source link

Support <code> blocks #136

Closed garretyoder closed 7 months ago

garretyoder commented 7 months ago

For example the following string:

<code>
Example                   Text
Newline
</code>

Will render as: Example Text Newline

Replacing all \n with <p> seems to reliably solve the newline problem, and replacing spaces with the html space code seems to solve that problem, but I'm unsure how to swap the font to monospace for that specific block of html.

garretyoder commented 7 months ago

I had two tabs open and opened this issue in the completely wrong repo, my apologies.