ssb: Fix naked hashtag links (to the corresponding channel).
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m53s

This commit is contained in:
Cory McWilliams 2025-01-04 13:03:58 -05:00
parent 763f7d45d8
commit 1ed066ef0f
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&bivD/AIKN+ZOBUrq6+Z049v1AJ5PXV4M1Uqot+iHg5M=.sha256"
"previous": "&51G4JroQ8+3iBddnFQoTVXYrLTtZ/egQ+0NU4z60zBc=.sha256"
}

View File

@ -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;
}