Skip to content

Commit

Permalink
fix code block
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 2, 2022
1 parent 7331ca6 commit 1d5152e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d5152e

Please sign in to comment.