Replace octal escape sequences (#21156)

* replace octal escape characters

* Add disable eslint
This commit is contained in:
Simon Lamon 2024-06-26 10:19:52 +02:00 committed by GitHub
parent f42a9ac070
commit 94dc9308ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,7 +90,8 @@ class HaAnsiToHtml extends LitElement {
private _parseTextToColoredPre(text) {
const pre = document.createElement("pre");
const re = /\033(?:\[(.*?)[@-~]|\].*?(?:\007|\033\\))/g;
// eslint-disable-next-line no-control-regex
const re = /\x1b(?:\[(.*?)[@-~]|\].*?(?:\x07|\x1b\\))/g;
let i = 0;
const state: State = {