question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Text wrapping edge case

See original GitHub issue

Discovered a possible edge case with text wrapping, probably connected to when a “word” is greater than the available width.

Consider the following:

console.print("Hello, World...123 ", width=10)

This produces:

Hello, Wor
ld...123

I think this occurs because “World…123” doesn’t fit in to 10 characters, so folds on to the next line.

I would expect there to be an additional new line after the Hello, like this:

Hello,
World...12
3

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
willmcgugancommented, May 12, 2022

Rich has a concept of “overflow”, which captures this. Although we don’t do hyphens as I thought the rules were complex and language specific.

0reactions
github-actions[bot]commented, May 27, 2022

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text Not Wrapping Properly in Edge - Microsoft Community
Now, Edge is no longer properly wrapping text around images and in certain cases, where there is an <em> tag at the beginning...
Read more >
4 causes for text wrap misbehavior - CreativePro Network
When this happens, go through this quick checklist to help identify the problem. 1. Has the image been flipped or rotated? In the...
Read more >
Deep Dive into Text Wrapping and Word Breaking
Let's talk about the various ways we can control how text wraps (or doesn't wrap) on a web page. CSS gives us a...
Read more >
IE11 flexbox preventing text wrapping? [closed] - Stack Overflow
I ran into a version of this bug, where text inside a flex item wasn't wrapping, and found that what fixed it in...
Read more >
Edge Cases to Keep in Mind. Part 1 - Text - Droids On Roids
Some may cause numerous issues, from bugs in your app through visual artefacts to even victims! Let's take a look at how we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found