2026-07-23 17:00:55 +03:30
|
|
|
import { type } from "@/lib/typography";
|
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
2026-07-02 02:46:20 +03:30
|
|
|
function formatInlineMarkdown(text: string): string {
|
|
|
|
|
return text
|
|
|
|
|
.replace(/`([^`]+)`/g, "<code>$1</code>")
|
|
|
|
|
.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ChangelogItem({ text }: { text: string }) {
|
|
|
|
|
return (
|
|
|
|
|
<li
|
2026-07-23 17:00:55 +03:30
|
|
|
className={cn(
|
|
|
|
|
type["body-sm"],
|
|
|
|
|
"list-disc text-muted-foreground marker:text-muted-foreground/50",
|
|
|
|
|
"[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5",
|
|
|
|
|
"[&_code]:font-mono [&_code]:text-[0.6875rem]",
|
|
|
|
|
"[&_strong]:font-medium [&_strong]:text-foreground/90"
|
|
|
|
|
)}
|
2026-07-02 02:46:20 +03:30
|
|
|
dangerouslySetInnerHTML={{ __html: formatInlineMarkdown(text) }}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|