Fix regex in stripAnsi.
This commit is contained in:
@@ -30,7 +30,7 @@ proc withColor*(str: string, color: TermColor, bright, bold, skipReset = false):
|
|||||||
|
|
||||||
|
|
||||||
proc stripAnsi*(str: string): string =
|
proc stripAnsi*(str: string): string =
|
||||||
let STRIP_ANSI_REGEX = re"\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]"
|
let STRIP_ANSI_REGEX = re"\x1B\[([0-9]{1,2}(;[0-9]{0,2})?)?[m|K]"
|
||||||
return str.replace(STRIP_ANSI_REGEX, "")
|
return str.replace(STRIP_ANSI_REGEX, "")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
author = "Jonathan Bernard"
|
author = "Jonathan Bernard"
|
||||||
description = "Helper functions for writing command line interfaces."
|
description = "Helper functions for writing command line interfaces."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Reference in New Issue
Block a user