import { Link } from '@tanstack/react-router' import Markdown from 'react-markdown' import rehypeRaw from 'rehype-raw' import rehypeSanitize from 'rehype-sanitize' import remarkGfm from 'remark-gfm' interface Props { children: string } export default function Mdown({ children }: Props) { return ( }, li(props) { const { node, ...rest } = props return
  • }, a(props) { const { node, ...rest } = props const classes = 'text-sky-600 underline' if (rest.href?.startsWith('dl:')) { let parts = rest.href.split('/') return ( ) } if (rest.href?.startsWith('/public')) { return ( ) } if (rest.href?.startsWith('/')) { return ( ) } return }, }} > {children} ) }