Skip to content

Commit

Permalink
fix: filter ANSI color for shell (#2529)
Browse files Browse the repository at this point in the history
* feat: filter ANSI color for shell

* chore: fix formatting

---------

Co-authored-by: Oleg Lobanov <oleg.lobanov@bitvavo.com>
  • Loading branch information
libook and o1egl committed Jul 20, 2023
1 parent c2f1423 commit 9bcfa90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Shell.vue
Expand Up @@ -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();
Expand Down

0 comments on commit 9bcfa90

Please sign in to comment.