mirror of https://github.com/Textualize/rich.git
docs
This commit is contained in:
parent
5c028214a6
commit
20078d6d19
|
@ -19,3 +19,11 @@ Rich can render Markdown to the console. To render markdown, construct a :class:
|
|||
console.print(md)
|
||||
|
||||
Note that code blocks are rendered with full syntax highlighting!
|
||||
|
||||
You can also use the Markdown class from the command line. The following example displays a readme in the terminal::
|
||||
|
||||
python -m rich.markdown README.md
|
||||
|
||||
Run the following to see the full list of arguments for the markdown command::
|
||||
|
||||
python -m rich.markdown -h
|
|
@ -3,7 +3,7 @@
|
|||
Rich Text
|
||||
=========
|
||||
|
||||
Rich has a :class:`~rich.text.Text` class which you can use to mark up strings with color and style attributes. You can consider this class to be like a mutable string with additional style information.
|
||||
Rich has a :class:`~rich.text.Text` class you can use to mark up strings with color and style attributes. You can consider this class to be a mutable string with additional style information.
|
||||
|
||||
One way to add a style to Text is the :meth:`~rich.text.Text.stylize` method which applies a style to a start and end offset. Here is an example::
|
||||
|
||||
|
|
Loading…
Reference in New Issue