From 715aa8bd559623ca8246afcd1e50f8d72c93f87d Mon Sep 17 00:00:00 2001 From: James Lyne Date: Fri, 14 Jan 2022 14:38:43 +0000 Subject: [PATCH] Add missing export --- src/util.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.ts b/src/util.ts index 8136f0e..9d8e8c2 100644 --- a/src/util.ts +++ b/src/util.ts @@ -219,6 +219,10 @@ export const decodeHTMLEntities = (text: string) => { return decodeTextarea.textContent || ''; } +export const stripHTML = (text: string) => { + return documentRange.createContextualFragment(text.replace(brToSpaceRegex,' ')).textContent || ''; +} + export const clipboardSuccess = () => () => notify(useStore().state.messages.copyToClipboardSuccess); export const clipboardError = () => (e: Error) => {