fix: filter ANSI color for shell (#2529)

* feat: filter ANSI color for shell

* chore: fix formatting

---------

Co-authored-by: Oleg Lobanov <oleg.lobanov@bitvavo.com>
This commit is contained in:
Daniel Li
2023-07-20 23:38:53 +08:00
committed by GitHub
parent c2f1423c02
commit 9bcfa900f9

View File

@@ -113,7 +113,10 @@ export default {
this.scroll();
},
() => {
results.text = results.text.trimEnd();
results.text = results.text
// eslint-disable-next-line no-control-regex
.replace(/\u001b\[[0-9;]+m/g, "") // Filter ANSI color for now
.trimEnd();
this.canInput = true;
this.$refs.input.focus();
this.scroll();