From 20078d6d1936fdc50fb4d86e9c7e54c55c4e691a Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Fri, 8 May 2020 15:03:16 +0100 Subject: [PATCH] docs --- docs/source/markdown.rst | 8 ++++++++ docs/source/text.rst | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/markdown.rst b/docs/source/markdown.rst index 2c33d233..ab8879e9 100644 --- a/docs/source/markdown.rst +++ b/docs/source/markdown.rst @@ -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 \ No newline at end of file diff --git a/docs/source/text.rst b/docs/source/text.rst index 035aa2b4..4a7b2b3c 100644 --- a/docs/source/text.rst +++ b/docs/source/text.rst @@ -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::