fix: markup headings and bold text visible in light mode

This commit is contained in:
2026-04-12 15:52:19 +03:00
parent 28afcc18bc
commit 9f86bcbce9
+2 -2
View File
@@ -16,7 +16,7 @@ function parseInline(text: string, keyPrefix: string): React.ReactNode[] {
parts.push(text.slice(lastIndex, match.index));
}
if (match[2]) {
parts.push(<strong key={`${keyPrefix}-b${key++}`} className="font-semibold text-white">{match[2]}</strong>);
parts.push(<strong key={`${keyPrefix}-b${key++}`} className="font-semibold text-neutral-900 dark:text-white">{match[2]}</strong>);
} else if (match[3]) {
parts.push(<em key={`${keyPrefix}-i${key++}`}>{match[3]}</em>);
}
@@ -47,7 +47,7 @@ export function formatMarkup(text: string): React.ReactNode {
// ## Heading
if (trimmed.startsWith("## ")) {
elements.push(
<span key={key++} className="block mt-3 mb-1 text-sm font-semibold text-white">
<span key={key++} className="block mt-3 mb-1 text-sm font-semibold text-neutral-900 dark:text-white">
{parseInline(trimmed.slice(3), `h${key}`)}
</span>
);