mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #295] <nobr> like functionality for TextView? #228
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#228
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mikeschinkel on GitHub (Jun 5, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/295
I am finding a need for a "No Break" feature in TextView similar to the
<nobr></nobr>of HTML. Specifically I am usingWordWrapand I want to have quoted strings to call them out as definitions, e.g. "Provide a 'TextView' object for displaying text" but I am finding that wrapping is happening at the quote and so I get some like thing:Maybe an even simpler option would be to not wrap on quoted strings, except inside the string when there is no option?
@rivo commented on GitHub (Jul 5, 2019):
The problem in your case is rather that
WordWrap()shouldn't have broken the string after the'. I think I used the wrong regex character class here. The latest commit fixes this.Apart from that, it's unlikely that I will introduce a
nobr-like tag in the near future. With all the tagstviewalready supports, the code has become very complex and I've rewritten it multiple times. It would be heading towards an "HTML widget" which is an entire project on its own. I have no plans for something like that.@mikeschinkel commented on GitHub (Jul 5, 2019):
@rivo Thanks.