Update parse.js

This commit is contained in:
CodexAdrian
2023-03-28 18:02:22 -04:00
parent 70e894c268
commit 8cc44b3958

View File

@@ -86,7 +86,9 @@ export const md = (options = {}) => {
if (allowedHostnames.includes(url.hostname)) { if (allowedHostnames.includes(url.hostname)) {
return defaultLinkOpenRenderer(tokens, idx, options, env, self) return defaultLinkOpenRenderer(tokens, idx, options, env, self)
} }
} catch (err) {} } catch (err) {
/* empty */
}
} }
tokens[idx].attrSet('rel', 'noopener nofollow ugc') tokens[idx].attrSet('rel', 'noopener nofollow ugc')
@@ -126,7 +128,9 @@ export const md = (options = {}) => {
if (allowedHostnames.includes(url.hostname)) { if (allowedHostnames.includes(url.hostname)) {
return defaultImageRenderer(tokens, idx, options, env, self) return defaultImageRenderer(tokens, idx, options, env, self)
} }
} catch (err) {} } catch (err) {
/* empty */
}
token.attrs[index][1] = `//wsrv.nl/?url=${encodeURIComponent(src)}` token.attrs[index][1] = `//wsrv.nl/?url=${encodeURIComponent(src)}`
} }