termynal / termynal.py

Python markdown terminal. Built for mkdocs
https://termynal.github.io/termynal.py/
MIT License
95 stars 8 forks source link

Formatting issue with `rich` panels #14

Open adam-moss opened 1 year ago

adam-moss commented 1 year ago

Hi,

Thank you for this plugin, it has been good to see it's rapid evolution over the past couple of weeks šŸ˜„

Following the 0.7.0 update there appears to be a formatting issue when using terminal output contained within a rich panel:

Expected:

$ my-cli
 Usage: my-cli [OPTIONS] COMMAND [ARGS]...                                     

ā•­ā”€ Options ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•®
ā”‚ --about               -a        Show the application about dialog and exit.  ā”‚
ā”‚ --version             -v        Show the application version and exit.       ā”‚
ā”‚ --install-completion            Install completion for the current shell.    ā”‚
ā”‚ --show-completion               Show completion for the current shell, to    ā”‚
ā”‚                                 copy it or customize the installation.       ā”‚
ā”‚ --help                          Show this message and exit.                  ā”‚
ā•°ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•Æ

Actual:

$ my-cli
 Usage: my-cli [OPTIONS] COMMAND [ARGS]...                                     

ā•­ā”€ Options ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•®

ā”‚ --about               -a        Show the application about dialog and exit. ā”‚

ā”‚ --version             -v        Show the application version and exit. ā”‚

ā”‚ --install-completion            Install completion for the current shell. ā”‚

ā”‚ --show-completion               Show completion for the current shell, to ā”‚

ā”‚                                 copy it or customize the installation. ā”‚

ā”‚ --help                          Show this message and exit. ā”‚

ā•°ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•Æ

The line spacing is probably a css tweak I imagine, the collapsed white-space on the right I'm not too sure about.

Please let me know if you require an further info.

daxartio commented 1 year ago

Hi!

Thank you.

In 0.8.0 it looks like this

image

I removed extra spaces and now it looks

image
daxartio commented 1 year ago

About the line spacing, you actually can change the css style and will get this result

image

I will think how it will be made more comfortable