mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Fix Decolorise to also strip hyperlinks
This is needed so that the information view is correctly aligned when we add hyperlinks to it.
This commit is contained in:
@ -2,6 +2,8 @@ package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||
)
|
||||
|
||||
func TestDecolorise(t *testing.T) {
|
||||
@ -189,6 +191,10 @@ func TestDecolorise(t *testing.T) {
|
||||
input: "\x1b[38;2;157;205;18mta\x1b[0m",
|
||||
output: "ta",
|
||||
},
|
||||
{
|
||||
input: "a_" + style.PrintSimpleHyperlink("xyz") + "_b",
|
||||
output: "a_xyz_b",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user