Something went wrong. Try again.
A lexicon-driven AppView for ATProto.
Something went wrong. Try again.
12345678910111213import { visit } from 'unist-util-visit';import type { Root } from 'mdast';
export function remarkStripMdExtension() { return (tree: Root) => { visit(tree, 'link', (node) => { if (node.url && !node.url.startsWith('http')) { node.url = node.url.replace(/\.md(#|$)/, '$1'); } }); };}