strip html from colors from logs (#1604)

This commit is contained in:
Lucy C
2022-07-01 15:41:09 -06:00
committed by GitHub
parent f9b0f6ae35
commit cb9c01d94b
3 changed files with 10 additions and 5 deletions

View File

@@ -21,3 +21,8 @@ export async function copyToClipboard(str: string): Promise<boolean> {
return copy
}
}
export function strip(html: string) {
let doc = new DOMParser().parseFromString(html, 'text/html')
return doc.body.textContent || ''
}