ssb+issues: Fix missing dependencies of my commonmarkjs extensions.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 18m56s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 18m56s
This commit is contained in:
parent
559504ae29
commit
92bf01a183
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦟",
|
"emoji": "🦟",
|
||||||
"previous": "&4QfQjoCbdmCRu0nIBdOFiHBydYlDyyXrWqve6ELAmKA=.sha256"
|
"previous": "&O0huuEgL/UQC9bkUfhPOyZFo9eRiz+koOkba6QwCGNA=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
import * as linkify from './commonmark-linkify.js';
|
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) {
|
function image(node, entering) {
|
||||||
if (
|
if (
|
||||||
node.firstChild?.type === 'text' &&
|
node.firstChild?.type === 'text' &&
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🐌",
|
"emoji": "🐌",
|
||||||
"previous": "&GDAJLaMKjeSXooWgpbw7G/40hgtRT1mYVK2twtEhWHA=.sha256"
|
"previous": "&CKsS2aS8+7u9S5jDCiqBLA6xr7xLdMHclMKHjzwxcnM=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,12 @@ import * as hashtagify from './commonmark-hashtag.js';
|
|||||||
|
|
||||||
const k_code_classes = 'w3-theme-l4 w3-theme-border w3-round';
|
const k_code_classes = 'w3-theme-l4 w3-theme-border w3-round';
|
||||||
|
|
||||||
|
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) {
|
function image(node, entering) {
|
||||||
if (
|
if (
|
||||||
node.firstChild?.type === 'text' &&
|
node.firstChild?.type === 'text' &&
|
||||||
|
Loading…
Reference in New Issue
Block a user