fix code block

This commit is contained in:
Will McGugan 2022-01-02 15:50:38 +00:00
parent 7331ca6b63
commit 1d5152ef52
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ Alternatively, you can construct styled text by calling :meth:`~rich.text.Text.a
text.append(" World!")
console.print(text)
If you would like to use text that is already formatted with ANSI codes, call :meth:`~rich.text.Text.from_ansi` to convert it to a ``Text`` object:
If you would like to use text that is already formatted with ANSI codes, call :meth:`~rich.text.Text.from_ansi` to convert it to a ``Text`` object::
text = Text.from_ansi("\033[1mHello, World!\033[0m")
console.print(text.spans)