Skip to content

Don't insert line breaks in long URLs - #59

Merged
justusschock merged 1 commit into
mainfrom
owbone/fix-printer-wrapping
May 26, 2026
Merged

Don't insert line breaks in long URLs#59
justusschock merged 1 commit into
mainfrom
owbone/fix-printer-wrapping

Conversation

@owbone

@owbone owbone commented May 26, 2026

Copy link
Copy Markdown
Collaborator

By default, rich automatically wraps text according to the console width by inserting new lines. This applies to the URLs that we render, and doesn't account for the prefix that we add later, so the end result is that URLs longer than the terminal width are unclickable and look a bit broken, e.g.:

           #               
       #########           
   #################       
############# #########    
##########   ##########    litlogger: 🚀 Experiment initialized
########    ###########                        Name: model-training/my-first-experiment-2026-05-26T11-44-36.416+00-00
###########    ########                   Teamspace: general
##########   ##########                     View at: 🔗 https://lightning.ai/lightning-ai/general/experiments/model-training%2Fmy-first-experiment-2026-05-26T11-
44-36.416%2B00-00
#########  ############    
   #################       
       #########           
           #   

Use soft_wrap=True to leave the wrapping up to the terminal.

@owbone
owbone enabled auto-merge (squash) May 26, 2026 13:54
@owbone
owbone marked this pull request as draft May 26, 2026 15:03
auto-merge was automatically disabled May 26, 2026 15:03

Pull request was converted to draft

@owbone
owbone marked this pull request as ready for review May 26, 2026 15:03
@owbone
owbone enabled auto-merge (squash) May 26, 2026 15:04
@justusschock
justusschock disabled auto-merge May 26, 2026 15:13
@justusschock
justusschock merged commit ce60db0 into main May 26, 2026
48 of 63 checks passed
@justusschock
justusschock deleted the owbone/fix-printer-wrapping branch May 26, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants