From 1ed066ef0f6d9b966ceb9be5b9639b2ed5642651 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sat, 4 Jan 2025 13:03:58 -0500 Subject: [PATCH] ssb: Fix naked hashtag links (to the corresponding channel). --- apps/ssb.json | 2 +- apps/ssb/commonmark-hashtag.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 1b567cf9..ff94a5cd 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&bivD/AIKN+ZOBUrq6+Z049v1AJ5PXV4M1Uqot+iHg5M=.sha256" + "previous": "&51G4JroQ8+3iBddnFQoTVXYrLTtZ/egQ+0NU4z60zBc=.sha256" } diff --git a/apps/ssb/commonmark-hashtag.js b/apps/ssb/commonmark-hashtag.js index bac1de47..f07c1e2e 100644 --- a/apps/ssb/commonmark-hashtag.js +++ b/apps/ssb/commonmark-hashtag.js @@ -7,7 +7,7 @@ function textNode(text) { function linkNode(text, link) { const linkNode = new commonmark.Node('link', undefined); if (link.startsWith('#')) { - linkNode.destination = `#${encodeURIComponent('#' + link)}`; + linkNode.destination = `#${encodeURIComponent(link)}`; } else { linkNode.destination = link; }