Skip to content

Commit

Permalink
remove ansi codes from provided version string
Browse files Browse the repository at this point in the history
  • Loading branch information
kentac55 committed Feb 11, 2019
1 parent e47889a commit 9e5b27f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Versions.re
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ let format = version => {
| exception _ => version
};

version;
let ansiCharRegex = Str.regexp({|\\027\[[0-9]+m|});
Str.global_replace(ansiCharRegex, "", String.escaped(version));
};

let endsWith = (~suffix, str) => {
Expand Down

0 comments on commit 9e5b27f

Please sign in to comment.