forked from cory/tildefriends
ssb: Fix naked hashtag links (to the corresponding channel).
This commit is contained in:
parent
763f7d45d8
commit
1ed066ef0f
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&bivD/AIKN+ZOBUrq6+Z049v1AJ5PXV4M1Uqot+iHg5M=.sha256"
|
"previous": "&51G4JroQ8+3iBddnFQoTVXYrLTtZ/egQ+0NU4z60zBc=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ function textNode(text) {
|
|||||||
function linkNode(text, link) {
|
function linkNode(text, link) {
|
||||||
const linkNode = new commonmark.Node('link', undefined);
|
const linkNode = new commonmark.Node('link', undefined);
|
||||||
if (link.startsWith('#')) {
|
if (link.startsWith('#')) {
|
||||||
linkNode.destination = `#${encodeURIComponent('#' + link)}`;
|
linkNode.destination = `#${encodeURIComponent(link)}`;
|
||||||
} else {
|
} else {
|
||||||
linkNode.destination = link;
|
linkNode.destination = link;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user