Skip to content

Commit 51d9ca8

Browse files
committed
Fix(npub): Do not parse npubs in links
1 parent 8337aad commit 51d9ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rehype-sn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default function rehypeSN (options = {}) {
137137
}
138138

139139
// Handle Nostr IDs
140-
if (node.type === 'text') {
140+
if (node.type === 'text' && !(parent && parent.tagName === 'a')) {
141141
const newChildren = []
142142
let lastIndex = 0
143143
let match

0 commit comments

Comments
 (0)