Skip to content
Myr

Small fix for ANSI code regex

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent f25c73c · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/main.rs+1 added-1 removed
146 unmodified lines
147 Regex::new(r"^\.([A-Za-z0-9]+)\s*(?:00;)?38;5;([0-9]+)\b")148 .unwrap();149150 let pattern_ansi =151 Regex::new(r"^\.([A-Za-z0-9]+)\s*([0-9][0-9]);([0-9][0-9])\b")151 Regex::new(r"^\.([A-Za-z0-9]+)\s*(?:([0-9][0-9]);)?([0-9][0-9])\b")152 .unwrap();153154 for line in BufReader::new(file).lines() {155 let line_s = line.unwrap();
103 unmodified lines