This commit is contained in:
Will McGugan 2026-01-23 16:18:20 +00:00
parent d008e2ab69
commit 3309212192
3 changed files with 52 additions and 0 deletions

17
FAQ.md
View File

@ -1,5 +1,6 @@
# Frequently Asked Questions
- [Extra space, not enough space, in Jupyter output](#extra-space-not-enough-space-in-jupyter-output)
- [How do I log a renderable?](#how-do-i-log-a-renderable)
- [How do I render console markup in RichHandler?](#how-do-i-render-console-markup-in-richhandler)
- [Incorrect highlights in printed output](#incorrect-highlights-in-printed-output)
@ -10,6 +11,22 @@
- [Why does content in square brackets disappear?](#why-does-content-in-square-brackets-disappear)
- [Why does emoji break alignment in a Table or Panel?](#why-does-emoji-break-alignment-in-a-table-or-panel)
<a name="extra-space-not-enough-space-in-jupyter-output"></a>
## Extra space, not enough space, in Jupyter output
There are many different implementations of Jupyter, from different venders.
Different notebook software may render Rich's output differently, due to how the CSS is constructed.
Adding or removing space, may make the output look good on your software, but break somewhere else.
I have been adding and removing new lines for jupyter since Rich added support, and I am reluctant to continue to do that, *unless* there is some supporting evidence that Rich is doing the wrong thing.
I'm afraid that making it look better for your software isn't evidence.
Without that evidence, I may close issues and PRs for this issue.
I will accept PRs, if sufficient research has been done regarding not breaking other Jupyter implementations (but that is a high bar).
Thanks for undertstanding.
<a name="how-do-i-log-a-renderable"></a>
## How do I log a renderable?

View File

@ -0,0 +1,16 @@
---
title: "Incorrect highlights in printed output"
alt_title:
- "Highlighter not highlighting data"
---
Rich's default highlighter will highlight a number of common patterns, useful for debugging.
Occasionally you may find that it highlights text incorrectly.
This may be unavoidable, as Rich only sees text and can only make a best guess at what it means.
If this happens, consider disabling highlighting, or write a custom highlighter that better reflects the text you are writing. See the docs for details...
https://rich.readthedocs.io/en/latest/highlighting.html
Issues and PRs for highlighters will only be accepted for clearly broken regular expressions.
This is because a fix for your needs can break the highlighting for someone else.

View File

@ -0,0 +1,19 @@
---
title: "Extra space, not enough space, in Jupyter output"
alt_titles:
- "Extra new line in Jupyter"
- "Not enough space in Jupyter"
---
There are many different implementations of Jupyter, from different venders.
Different notebook software may render Rich's output differently, due to how the CSS is constructed.
Adding or removing space, may make the output look good on your software, but break somewhere else.
I have been adding and removing new lines for jupyter since Rich added support, and I am reluctant to continue to do that, *unless* there is some supporting evidence that Rich is doing the wrong thing.
I'm afraid that making it look better for your software isn't evidence.
Without that evidence, I may close issues and PRs for this issue.
I will accept PRs, if sufficient research has been done regarding not breaking other Jupyter implementations (but that is a high bar).
Thanks for undertstanding.