Markdown rendering doesn't work on light terminal backgrounds
-
I'm using the latest version of the extension (Run glab --version)- Extension version: Put your extension version here
-
Operating system and version: Put your version here -
Gitlab.com or self-managed instance? gitlab.com/self-managed instance/both -
GitLab version (if self-managed) GitLab version here (Use the versionendpoint, like this: gitlab.my-company.com/api/v4/version) -
I have performed glab auth statusto check for authentication issues -
Run the command in debug mode (like DEBUG=true glab mr list) and attach any useful output
Summary
Markdown rendering, for example view issue, or view MR, theme doesn't work on light terminal backgrounds.
We should use termenv.HasDarkBackground() to automatically set the theme if the user hasn't specified it.
Environment
- OS: Darwin 24.3.0 arm64
- SHELL: /bin/zsh
- TERM: xterm-256color
- GLAB: Current glab version: 1.53.0 (2025-02-11)%
Other:
Steps to reproduce
- Set your terminal to a light theme.
- Remove all glab theme env variables.
- View an issue / mr description
glab mr view
What is the current bug behavior?
Light text on a light background
What is the expected correct behavior?
Dark text on a light background
Relevant logs and/or screenshots
Possible fixes
Add detection to the RenderMarkdown function
