Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Update the docstring of the _make_rich_text method #972

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading