Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printf does not color the entire string #67

Open
luca-patrignani opened this issue Aug 6, 2023 · 0 comments
Open

Printf does not color the entire string #67

luca-patrignani opened this issue Aug 6, 2023 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@luca-patrignani
Copy link

System (please complete the following information):

  • OS: Kubuntu 22.04.2 LTS x86_64
  • GO Version: 1.20.4
  • Pkg Version: v1.5.4

ENV info on the terminal (by command env | grep -i TERM)
TERM_PROGRAM_VERSION=1.80.0
COLORTERM=truecolor
TERM=xterm-256color
TERM_PROGRAM=vscode

Describe the bug

When Printf recieves a "colored" string as argument it does not colors the part of string after %s.

To Reproduce

package main

import (
	"github.com/gookit/color"
)

func main() {
	color.FgRed.Printf("first %s third\n", color.FgYellow.Render("second"));
}

Expected behavior

I would expect that "first" and "third" will be colored in red, second in yellow. Instead first is colored in red, second in yellow and third in white

Screenshots
VS Code integrated terminal:
Screenshot_20230806_135419
Konsole:
Screenshot_20230806_135535
Additional context
I also tried this on Konsole and i have encountered the same issue.

@inhere inhere added the question Further information is requested label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants