Something went wrong. Try again.
A social knowledge tool for research trails, built on ATProto semble.so
research-tool social-network tools-for-thought atproto
Something went wrong. Try again.
123456789101112131415161718192021222324252627export interface ReaderLink { href: string; text: string;}
export function normalizeUrl(url: string): string { try { const u = new URL(url); u.hash = ''; return u.toString().replace(/\/$/, ''); } catch { return url; }}
/** http(s) links other than the article itself; null for the rest */export function toReaderLink( href: string, text: string, articleUrl: string,): ReaderLink | null { if (!/^https?:\/\//i.test(href)) return null; if (normalizeUrl(href) === normalizeUrl(articleUrl)) return null;
return { href, text: text.trim() || href };}