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

✨ Render Rich markup as HTML in Markdown docs #847

Merged
merged 19 commits into from
Nov 18, 2024

Conversation

svlandeg
Copy link
Member

@svlandeg svlandeg commented May 28, 2024

Fixes #819: ensure that Rich-formatted help texts get rendered properly in Markdown by using the Rich built-in export_html functionality.

I've expanded the example from #819 to ensure that the following are covered: Command help, Option help, Argument help, default value, [required] flag.

TODO

Double check whether existing functionality and printing behaviour has remained unchanged.

@svlandeg svlandeg added feature New feature, enhancement or request p3 labels May 28, 2024
@svlandeg svlandeg marked this pull request as ready for review May 28, 2024 17:58
typer/core.py Show resolved Hide resolved
@svlandeg svlandeg changed the title ✨ Render Rich markup as HTML in Markdown docs ✨ Render Rich markup as HTML in Markdown docs Aug 26, 2024
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! 🚀 🙇

@tiangolo tiangolo merged commit 5996fc1 into fastapi:master Nov 18, 2024
20 checks passed
@tiangolo
Copy link
Member

Just for completeness, extra info:

I'm not sure what changed, maybe it was something in a recent release in Rich, because tests were passing here before merging, but then they were no longer passing 😅

I changed it here: #1055, it was about how to capture and render the Rich console.

@svlandeg svlandeg deleted the feat/markup branch November 19, 2024 09:20
masenf added a commit to reflex-dev/reflex that referenced this pull request Nov 21, 2024
The `rich` module should be set to `None`, indicating that rich should not be used.

Setting it to `False` worked before, but recently added code in typer fails
when checking `if rich is not None`.

ref: fastapi/typer#847
masenf added a commit to reflex-dev/reflex that referenced this pull request Nov 21, 2024
The `rich` module should be set to `None`, indicating that rich should not be used.

Setting it to `False` worked before, but recently added code in typer fails
when checking `if rich is not None`.

ref: fastapi/typer#847
Lendemor pushed a commit to reflex-dev/reflex that referenced this pull request Nov 21, 2024
The `rich` module should be set to `None`, indicating that rich should not be used.

Setting it to `False` worked before, but recently added code in typer fails
when checking `if rich is not None`.

ref: fastapi/typer#847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request p3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rich markup in generated Markdown docs
2 participants