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 syntax highlighting issues #121

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

pd95
Copy link
Contributor

@pd95 pd95 commented Jan 27, 2025

This PR reimplements the "features" of PR #84 which is outdated.

This fixes "unreadable code" problem (as in #113) when no code highlighting is enabled.
It also enables dynamic switching of dark/light mode and enabling/disabling syntax highlighting "on the fly".

  • CodeBlocks derive background colors from color scheme (instead of hardcoded colors)
  • CodeBlocks should depend on unique CodeHighlighter instance
  • CodeHighlighter handles color scheme and applies it to highlightr theme ("atom-one-dark" or "atom-one-light").
  • ChatView monitors current color scheme and calls-back CodeHighlighter

pd95 added 3 commits January 27, 2025 23:05
- Derive background colors from color scheme
This fixes "unreadable code" problem (as in kevinhermawan#113) when no code highlighting is enabled.
Also this enables dynamic switching of dark/light mode and enabling/disabling syntax highlighting
@kevinhermawan
Copy link
Owner

Thanks @pd95, so after this PR merged we can close #84?

@kevinhermawan kevinhermawan merged commit 8207b63 into kevinhermawan:main Jan 28, 2025
@pd95 pd95 deleted the fix/syntax-highlighting branch January 28, 2025 19:55
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