Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/core/src/constructors/internal-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export function createShikiInternalSync(options: HighlighterCoreOptions<true>):
} {
ensureNotDisposed()
const theme = getTheme(name)
if (_lastTheme !== name) {
_registry.setTheme(theme)
_lastTheme = name
}
// Always set the theme to ensure the registry is in sync.
// The registry has its own cache so this is not too expensive.
_registry.setTheme(theme)
_lastTheme = name
const colorMap = _registry.getColorMap()
return {
theme,
Expand Down