diff --git a/src/paste-markdown-html.ts b/src/paste-markdown-html.ts index 83dacd1..d7c3fa0 100644 --- a/src/paste-markdown-html.ts +++ b/src/paste-markdown-html.ts @@ -38,7 +38,7 @@ function onPaste(event: ClipboardEvent) { const parser = new DOMParser() const doc = parser.parseFromString(textHTMLClean, 'text/html') const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_ALL, node => - node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT + node.parentNode && isLink(node.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT, ) const markdown = convertToMarkdown(plaintext, walker)