Skip to content

Commit

Permalink
📝 Update the docstring of the _make_rich_text method (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg authored Nov 7, 2024
1 parent 990efec commit 57e599a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions typer/rich_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,9 @@ def _make_rich_text(
) -> Union[Markdown, Text]:
"""Take a string, remove indentations, and return styled text.
By default, return the text as a Rich Text with the request style.
If `rich_markdown_enable` is `True`, also parse the text for Rich markup strings.
If `rich_markup_enable` is `True`, parse as Markdown.
Only one of `rich_markdown_enable` or `rich_markup_enable` can be True.
If both are True, `rich_markdown_enable` takes precedence.
By default, the text is not parsed for any special formatting.
If `markup_mode` is `"rich"`, the text is parsed for Rich markup strings.
If `markup_mode` is `"markdown"`, parse as Markdown.
"""
# Remove indentations from input text
text = inspect.cleandoc(text)
Expand Down

0 comments on commit 57e599a

Please sign in to comment.