/**
 * Replaces HTML in Markdown text with its simplified representation.
 */
export const toPlainMarkdown = (text: string) =>
  text.replaceAll(/<\s*a(?:\s+\S+)*(?:\s+href="([^"]+)")(?:\s+\S+)*\s*>\s*([^<]+)\s*<\/a>/g, "[$2]($1)");
