Skip to content

Commit

Permalink
fix: shikiji custom theme loading, fix slidevjs#1258
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored and openscript committed Jan 28, 2024
1 parent 8fd8745 commit c271334
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 c271334

Please sign in to comment.