diff --git a/src/adapter/objectPreview/index.ts b/src/adapter/objectPreview/index.ts index 4d532779a..8e05544d7 100644 --- a/src/adapter/objectPreview/index.ts +++ b/src/adapter/objectPreview/index.ts @@ -532,14 +532,14 @@ export function formatAsTable(param: Cdp.Runtime.ObjectPreview): string { const table: string[] = []; table.push( - rowTemplate.replace('[', '╭').replace(/\|/g, '┬').replace(']', '╮').replace(/-/g, '┄'), + rowTemplate.replace('[', '╭').replace(/\|/g, '┬').replace(']', '╮').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global. ); const header: string[] = []; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion for (const name of colNames.values()) header.push(pad(name || '', colLengths.get(name)!)); table.push('┊ ' + header.join(' ┊ ') + ' ┊'); table.push( - rowTemplate.replace('[', '├').replace(/\|/g, '┼').replace(']', '┤').replace(/-/g, '┄'), + rowTemplate.replace('[', '├').replace(/\|/g, '┼').replace(']', '┤').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global. ); for (const value of rows) { @@ -551,7 +551,7 @@ export function formatAsTable(param: Cdp.Runtime.ObjectPreview): string { table.push('┊ ' + row.join(' ┊ ') + ' ┊'); } table.push( - rowTemplate.replace('[', '╰').replace(/\|/g, '┴').replace(']', '╯').replace(/-/g, '┄'), + rowTemplate.replace('[', '╰').replace(/\|/g, '┴').replace(']', '╯').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global. ); return table.map(row => stringUtils.trimEnd(row, maxTableWidth)).join('\n'); }