Skip to content

Commit

Permalink
Replace octal escape sequences (#21156)
Browse files Browse the repository at this point in the history
* replace octal escape characters

* Add disable eslint
  • Loading branch information
silamon authored Jun 26, 2024
1 parent f42a9ac commit 94dc930
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ha-ansi-to-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 94dc930

Please sign in to comment.