Skip to content

Commit

Permalink
fix: shikiji custom theme loading, fix #1258
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 26, 2024
1 parent 907a593 commit d8dd15f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/slidev/node/plugins/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ export async function loadShikijiSetups(
if ('theme' in result && 'themes' in result)
delete result.theme

if (result.theme && typeof result.theme !== 'string') {
// Rename theme to themes when provided in multiple themes format, but exclude when it's a theme object.
if (result.theme && typeof result.theme !== 'string' && !result.theme.name && !result.theme.tokenColors) {
result.themes = result.theme
delete result.theme
}
Expand Down

0 comments on commit d8dd15f

Please sign in to comment.