mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #84] Escape function for texts #61
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#61
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 @muesli on GitHub (Mar 20, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/84
When trying to display texts like
[foobar](as an actual text, not a color definition), a convenient little escape function would be handy, otherwise those texts are incorrectly interpreted as a color-markup.@rivo commented on GitHub (Mar 23, 2018):
Yeah, I want to add this. Not just for strings but also for
io.Writer's so you can use it in theTextViewprimitive as well.@rivo commented on GitHub (Mar 29, 2018):
Btw, this also affects #91 so I will probably do this after introducing background colors.
@KingRikkie commented on GitHub (Apr 7, 2018):
Please make it handle Umlauts
äüöand brackets( )correctly. The current workaround with astrings.NewReplacer("]", "[]")fails when there are any of said chars inside the square brackets as tview will ignore the brackets then leading to something like this in viewportstring with [Ümlauts] in brackets->string with [Ümlauts[] in bracketsstring with [bra(kets] in brackets->string with [bra(kets[] in brackets@rivo commented on GitHub (Apr 13, 2018):
The package now has an escape function. See
Escape()for details.