diff --git a/docs/source/highlighting.rst b/docs/source/highlighting.rst index 03993190c..34274d977 100644 --- a/docs/source/highlighting.rst +++ b/docs/source/highlighting.rst @@ -1,3 +1,5 @@ +.. _highlighting: + Highlighting ============ diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 57d19154b..3576c6ac8 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -1,7 +1,7 @@ Introduction ============ -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. +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. 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. @@ -38,7 +38,7 @@ The quickest way to get up and running with Rich is to import the alternative `` from rich import print -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. +You can then print strings or objects to the terminal in the usual way. Rich will do some basic syntax :ref:`highlighting` and format data structures to make them easier to read. Strings may contain :ref:`console_markup` which can be used to insert color and styles in to the output. @@ -50,7 +50,7 @@ This writes the following output to the terminal (including all the colors and s .. raw:: html -
Hello World!                                                 
+    
Hello World!
     {
         '__annotations__': {},
         '__builtins__': <module 'builtins' (built-in)>,
@@ -75,7 +75,7 @@ Rich in the REPL
 Rich may be installed in the REPL so that Python data structures are automatically pretty printed with syntax highlighting. Here's how::
 
     >>> from rich import pretty
-    >>> pretty.install() 
+    >>> pretty.install()
     >>> ["Rich and pretty", True]
 
 You can also use this feature to try out Rich *renderables*. Here's an example::
@@ -91,8 +91,8 @@ IPython Extension
 Rich also includes an IPython extension that will do this same pretty install + pretty tracebacks. Here's how to load it::
 
     In [1]: %load_ext rich
-    
-You can also have it load by default by adding `"rich"` to the ``c.InteractiveShellApp.extension`` variable in 
+
+You can also have it load by default by adding `"rich"` to the ``c.InteractiveShellApp.extension`` variable in
 `IPython Configuration `_.
 
 Rich Inspect