Validations
Describe the bug
If another theme is loaded before the theme which is used, some parts of the code rendered will have incorrect color.
For example, here we load material-theme-palenight before catppuccin-latte
const highlighter = await getSingletonHighlighter({
langs: Object.keys(bundledLanguages),
themes: ['material-theme-palenight', 'catppuccin-latte'],
});
monaco.languages.register({ id: 'regexp' });
shikiToMonaco(highlighter, monaco);
monaco.editor.create(document.getElementById('container'), {
value: code,
language: 'regexp',
theme: 'catppuccin-latte',
});
Reproduction
https://stackblitz.com/edit/vitejs-vite-xxyqdsye
Contributes