Skip to content

Commit 21432b4

Browse files
committed
docs
1 parent f2845e1 commit 21432b4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/source/highlighting.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _highlighting:
2+
13
Highlighting
24
============
35

docs/source/introduction.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Introduction
22
============
33

4-
Rich is a Python library for writing *rich* text (with color and style) to the terminal, and for displaying advanced content such as tables, markdown, and syntax highlighted code.
4+
Rich is a Python library for writing *rich* text (with color and style) to the terminal, and for displaying advanced content such as tables, markdown, and syntax highlighted code.
55

66
Use Rich to make your command line applications visually appealing and present data in a more readable way. Rich can also be a useful debugging aid by pretty printing and syntax highlighting data structures.
77

@@ -38,7 +38,7 @@ The quickest way to get up and running with Rich is to import the alternative ``
3838

3939
from rich import print
4040

41-
You can then print strings or objects to the terminal in the usual way. Rich will do some basic syntax highlighting and format data structures to make them easier to read.
41+
You can then print strings or objects to the terminal in the usual way. Rich will do some basic syntax :ref:`highlighting<highlighting>` and format data structures to make them easier to read.
4242

4343
Strings may contain :ref:`console_markup` which can be used to insert color and styles in to the output.
4444

@@ -50,7 +50,7 @@ This writes the following output to the terminal (including all the colors and s
5050

5151
.. raw:: html
5252

53-
<pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #800000; font-style: italic">Hello</span> World!
53+
<pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #800000; font-style: italic">Hello</span> World!
5454
<span style="font-weight: bold">{</span>
5555
<span style="color: #008000">'__annotations__'</span>: <span style="font-weight: bold">{}</span>,
5656
<span style="color: #008000">'__builtins__'</span>: <span style="font-weight: bold"><</span><span style="color: #ff00ff">module</span><span style="color: #000000"> </span><span style="color: #008000">'builtins'</span><span style="color: #000000"> </span><span style="color: #000000; font-weight: bold">(</span><span style="color: #000000">built-in</span><span style="color: #000000; font-weight: bold">)</span><span style="font-weight: bold">></span>,
@@ -75,7 +75,7 @@ Rich in the REPL
7575
Rich may be installed in the REPL so that Python data structures are automatically pretty printed with syntax highlighting. Here's how::
7676

7777
>>> from rich import pretty
78-
>>> pretty.install()
78+
>>> pretty.install()
7979
>>> ["Rich and pretty", True]
8080

8181
You can also use this feature to try out Rich *renderables*. Here's an example::
@@ -91,8 +91,8 @@ IPython Extension
9191
Rich also includes an IPython extension that will do this same pretty install + pretty tracebacks. Here's how to load it::
9292

9393
In [1]: %load_ext rich
94-
95-
You can also have it load by default by adding `"rich"` to the ``c.InteractiveShellApp.extension`` variable in
94+
95+
You can also have it load by default by adding `"rich"` to the ``c.InteractiveShellApp.extension`` variable in
9696
`IPython Configuration <https://ipython.readthedocs.io/en/stable/config/intro.html>`_.
9797

9898
Rich Inspect

0 commit comments

Comments
 (0)