don't render nostr:npub as a link
People often type the literal text `nostr:npub` when talking about nostr URIs. That shouldn't be converted to a link.
This commit is contained in:
parent
cc1d42c517
commit
9b2fb3b6bf
@ -36,7 +36,7 @@ export default function Text({ content, tags, creator, disableMedia, depth }: Te
|
||||
.map(f => {
|
||||
if (typeof f === "string") {
|
||||
return splitByUrl(f).map(a => {
|
||||
if (a.match(/^(?:https?|(?:web\+)?nostr|magnet):/i)) {
|
||||
if (a.match(/^(?:https?|(?:web\+)?nostr|magnet):/i) && a.toLowerCase() !== "nostr:npub") {
|
||||
if (disableMedia ?? false) {
|
||||
return (
|
||||
<a href={a} onClick={e => e.stopPropagation()} target="_blank" rel="noreferrer" className="ext">
|
||||
|
Loading…
x
Reference in New Issue
Block a user