Skip to content

Commit daa0406

Browse files
feat: clean ANSI escape from logs
1 parent ad7f6c7 commit daa0406

File tree

1 file changed

+1
-1
lines changed
  • src-tauri/src/game_process

1 file changed

+1
-1
lines changed

src-tauri/src/game_process/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub struct LogData {
4646
}
4747

4848
thread_local! {
49-
static ENTRY_REGEX: Regex = Regex::new(r"^\[(.*?)]\s?<(.*?)>\s?(.*)$").unwrap()
49+
static ENTRY_REGEX: Regex = Regex::new(r"^(?i:\x1b\[0m)?(?i:\x1b\[[\d;]*m)?\[(.*?)]\s?<(.*?)>\s?(.*)(?i:\x1b\[0m)?$").unwrap()
5050
}
5151

5252
impl LogData {

0 commit comments

Comments
 (0)