Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

291 B
Raw Blame
export default function parseMarkdown(value) {
  if (value.startsWith("# ")) return { type: "heading", text: value.slice(2) };
  if (/^\*\*.*\*\*$/u.test(value))
    return { type: "strong", text: value.slice(2, -2) };
  return { type: "paragraph", text: value.replaceAll("\r\n", "\n") };
}