Avoid stray control characters
This commit is contained in:
parent
a8a73aad4e
commit
f2c3f6f067
1 changed files with 6 additions and 0 deletions
|
|
@ -274,6 +274,12 @@ export function ansiToHtml(text: string): string {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Backspace: drop it to avoid stray control characters in HTML output
|
||||
if (text[i] === "\b") {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Track newlines and carriage returns
|
||||
if (text[i] === "\n") {
|
||||
// Close span before newline to prevent background color bleeding
|
||||
|
|
|
|||
Loading…
Reference in a new issue