refactor: remove logs and fix typo

This commit is contained in:
Armando Guarino 2024-11-06 14:06:48 +01:00
parent 444e6e5a11
commit 6bdb5917a5

View File

@ -263,9 +263,8 @@ export const Link = Mark.create<LinkOptions>({
const foundLinks: PasteRuleMatch[] = [] const foundLinks: PasteRuleMatch[] = []
if (text) { if (text) {
console.log(text)
const { validate, protocols, defaultProtocol } = this.options const { validate, protocols, defaultProtocol } = this.options
const links = find(text).filter(item => item.isLink && validate(item.href, { defaultValidate: href => !!isAllowedUri(href, protocols), protocols, defaultProtocol })) const links = find(text).filter(item => item.isLink && validate(item.value, { defaultValidate: href => !!isAllowedUri(href, protocols), protocols, defaultProtocol }))
if (links.length) { if (links.length) {
links.forEach(link => (foundLinks.push({ links.forEach(link => (foundLinks.push({