Skip to content
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

fix: block code rendering with transparent background #102

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

scottmckendry
Copy link
Contributor

Hello @MeanderingProgrammer! 🙂

First off, congrats on v5.0.0! Lots of great new features to play with!

Here is the fix for the issue described in #73 observed when using a transparent background.

Before:
image

After:
image

This was due to passing in the hl_mode = 'combine' option.

From the docs:

hl_mode : control how highlights are combined with the highlights of the text. Currently only affects virt_text highlights, but might affect hl_group in later versions.

  • "replace": only show the virt_text color. This is the default.
  • "combine": combine with background text color.
  • "blend": blend with background text color. Not supported for "inline" virt_text.

I've only tested this for a transparent background, but I'm 99% sure this will work the same way for solid backgrounds as well.

@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jul 29, 2024

Ah, that makes sense! Tested it with a solid background locally, it works.

Thanks for the PR!

@MeanderingProgrammer MeanderingProgrammer merged commit d8f692d into MeanderingProgrammer:main Jul 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants