* Fix issue #1905, item popover with commentId * Fix issue #1924, require nostr prefixes start with slash * revert hacks and unrelated changes, use commentId in rehype --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com> Co-authored-by: k00b <k00b@stacker.news>
This commit is contained in:
parent
43edef55eb
commit
f97c1b04e6
@ -59,10 +59,10 @@ export default function rehypeSN (options = {}) {
|
|||||||
if (node.properties.href.includes('#itemfn-')) {
|
if (node.properties.href.includes('#itemfn-')) {
|
||||||
node.tagName = 'footnote'
|
node.tagName = 'footnote'
|
||||||
} else {
|
} else {
|
||||||
const { itemId, linkText } = parseInternalLinks(node.properties.href)
|
const { itemId, commentId, linkText } = parseInternalLinks(node.properties.href)
|
||||||
if (itemId) {
|
if (itemId || commentId) {
|
||||||
node.tagName = 'item'
|
node.tagName = 'item'
|
||||||
node.properties.id = itemId
|
node.properties.id = commentId || itemId
|
||||||
if (node.properties.href === toString(node)) {
|
if (node.properties.href === toString(node)) {
|
||||||
node.children[0].value = linkText
|
node.children[0].value = linkText
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user