-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
ANSI renderer bg color not showing #432
Comments
Can you please include the ANSI sequence in plaintext, the color expected and the color rendered? |
The top section I grabbed it from the test suite here: https://github.com/shikijs/shiki/blob/main/packages/shiki/src/__tests__/ansi.test.ts#L6 It should look like this (dracula terminal theme): But looks like this (dracula shiki theme): The bg color behind WARN is the issue Exact snippet from my screenshots:
|
i'll take a look later but also @muenzpraeger |
Just ran a quick test. The tokens are correctly identified. {
value: ' WARN ',
foreground: { type: 'named', name: 'black' },
background: { type: 'named', name: 'yellow' },
decorations: Set(0) {}
} Now the thing is that the ANSI tokenizer returns only a single |
|
Currently shiki's theme token doesn't support background colors so for the ANSI implementation I just left it out. Was thinking about coming back to this. ANSI also supports strikethrough which would be nice to add to shiki at some point. |
oops, that's right, i meant to mention @blake-mealey not @muenzpraeger, sorry! |
I was messing around with the ansi renderer and It's not rendering well in some cases (maybe with the background only?). Using the test content too.
The text was updated successfully, but these errors were encountered: