mirror of
https://github.com/charmbracelet/gum
synced 2024-05-21 23:56:43 +02:00
chore(lint): add function comment
This commit is contained in:
parent
5887a10fa0
commit
8da9620bfd
|
@ -4,6 +4,7 @@ import "regexp"
|
||||||
|
|
||||||
var ansiEscape = regexp.MustCompile(`\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])`)
|
var ansiEscape = regexp.MustCompile(`\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])`)
|
||||||
|
|
||||||
|
// Strip strips a string of any of it's ansi sequences.
|
||||||
func Strip(text string) string {
|
func Strip(text string) string {
|
||||||
return ansiEscape.ReplaceAllString(text, "")
|
return ansiEscape.ReplaceAllString(text, "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue