feat: filter ANSI color for shell

This commit is contained in:
libook 2023-07-04 12:38:21 +08:00
parent 6744cd47ce
commit b486cce51e

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();