Feature custom themes logic (#2639)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Ali Al Jufairi
2025-07-20 16:51:18 +09:00
committed by GitHub
parent c0bfa388c5
commit 76b935d598
19 changed files with 1313 additions and 341 deletions

View File

@@ -100,9 +100,10 @@ export function colorizeCode(
language: string | null,
availableHeight?: number,
maxWidth?: number,
theme?: Theme,
): React.ReactNode {
const codeToHighlight = code.replace(/\n$/, '');
const activeTheme = themeManager.getActiveTheme();
const activeTheme = theme || themeManager.getActiveTheme();
try {
// Render the HAST tree using the adapted theme