Skip to content

Commit

Permalink
Merge pull request #3060 from jiaosenvip/patch-1
Browse files Browse the repository at this point in the history
Fix markup.rst
  • Loading branch information
willmcgugan committed Jul 29, 2023
2 parents cbf01a0 + 0379ab8 commit 8a616de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/markup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Escaping is important if you construct console markup dynamically, with ``str.fo
def greet(name):
console.print(f"Hello {name}!")

Calling ``greet("Will")`` will print a greeting, but if you were to call ``greet("[blink]Gotcha![/blink]"])`` then you will also get blinking text, which may not be desirable. The solution is to escape the arguments::
Calling ``greet("Will")`` will print a greeting, but if you were to call ``greet("[blink]Gotcha![/blink]")`` then you will also get blinking text, which may not be desirable. The solution is to escape the arguments::

from rich.markup import escape
def greet(name):
Expand Down

0 comments on commit 8a616de

Please sign in to comment.