Skip to content

Properly rendering rich text even if start tags are no longer visible #1353

Answered by willmcgugan
iiPythonx asked this question in Q&A
Discussion options

You must be logged in to vote

You probably don't want to do basic string operations on console markup if there is a chance you can break tags.

You can convert console markup in to a Text instance, and then further process it.

Here's how you can generate a Text object from markup:

text = Text.from_markup(my_markup)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iiPythonx
Comment options

Answer selected by iiPythonx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants