ssb+issues: Fix missing dependencies of my commonmarkjs extensions.

This commit is contained in:
2024-11-12 21:47:15 -05:00
parent 559504ae29
commit 92bf01a183
4 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,11 @@
import * as linkify from './commonmark-linkify.js';
var reUnsafeProtocol = /^javascript:|vbscript:|file:|data:/i;
var reSafeDataProtocol = /^data:image\/(?:png|gif|jpeg|webp)/i;
var potentiallyUnsafe = function(url) {
return reUnsafeProtocol.test(url) && !reSafeDataProtocol.test(url);
};
function image(node, entering) {
if (
node.firstChild?.type === 'text' &&