mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
parent
2b576a3cce
commit
85897ce9ec
|
@ -324,6 +324,11 @@ func (w *Writer) Write(background, foreground, text string) {
|
|||
w.write(i, s)
|
||||
}
|
||||
|
||||
// append remnant hyperlink
|
||||
w.builder.WriteString(w.hyperlinkBuilder.String())
|
||||
w.hyperlinkBuilder.Reset()
|
||||
|
||||
// reset colors
|
||||
w.writeEscapedAnsiString(colorStyle.End)
|
||||
|
||||
// reset current
|
||||
|
|
|
@ -17,6 +17,7 @@ func TestGenerateHyperlinkNoUrl(t *testing.T) {
|
|||
{Text: "sample text with no url", ShellName: shell.ZSH, Expected: "%{\x1b[47m%}%{\x1b[30m%}sample text with no url%{\x1b[0m%}"},
|
||||
{Text: "sample text with no url", ShellName: shell.PWSH, Expected: "\x1b[47m\x1b[30msample text with no url\x1b[0m"},
|
||||
{Text: "sample text with no url", ShellName: shell.BASH, Expected: "\\[\x1b[47m\\]\\[\x1b[30m\\]sample text with no url\\[\x1b[0m\\]"},
|
||||
{Text: "sample text with no url [test]", ShellName: shell.BASH, Expected: "\\[\x1b[47m\\]\\[\x1b[30m\\]sample text with no url [test]\\[\x1b[0m\\]"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
a := Writer{
|
||||
|
|
Loading…
Reference in a new issue