-
-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: color.charCodeAt is not a function
when using github-dark-default
with @shikijs/monaco
#894
Comments
Same here. Running into the same issue with |
This section right here is the culprit in both themes:
|
Then it's clearly a bug, no? If it's the wrong data-type. Do we know which of these values are the correct |
I've created a PR that hopefully resolves this shikijs/textmate-grammars-themes#117 @DavidSeptimus |
Same issue here #668 |
Weird that this has been an issue for so long 👀 |
A possible workaround until this has been fixed properly is to do the following: const highlighter = await createHighlighter({
themes: ['github-dark-default'],
langs: languages
});
const githubDarkDefaultTheme = highlighter.getTheme('github-dark-default');
githubDarkDefaultTheme.colors!['symbolIcon.constantForeground'] = '#3fb950'; This will overwrite the invalid array with the correct string color, and then it works as expected. |
I don't know if it's intended in the source theme, but I add a workaround to fix this for now |
Validations
Describe the bug
I have this shiki setup:
If i
github-dark-default
as a theme i get the following error in my console:It works fine if i set
github-dark
as my theme. What am i doing wrong here?Reproduction
look at code example
Contributes
The text was updated successfully, but these errors were encountered: