-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Syntax Highlighting in arc-green
Colors all Identifiers in Orange
#22348
Comments
Likely a C++ specific issue. Can you push an example to https://try.gitea.io/? |
https://try.gitea.io/wxiaoguang/test/src/branch/master/test.cpp
|
From my experiments, it happens in at least C++, Java, C#, Haskell, and Python. In fact, so far, I have not seen a language where it does not happen. I have uploaded some examples to try.gitea.io: All of these have the distinct "everything is orange" look, where all identifiers are assigned the same color. |
Fix broken highlight styles #23148 |
@wxiaoguang said he will take this issue after 1.19.0 or 1.19.1. So I think this should not prevent to release 1.19.0 |
I have proposed #23174 , @silverwind might want to do some changes (ping about progress). ps: it doesn't need to block 1.19.0 release. If 1.19.0 is ready, it could be released and backport the fix later. |
Yeah I will have look shortly. Agree it's not blocking 1.19 because IIRC the issue is present on 1.18 as well. |
The CSS styles in Gitea themes are out-of-sync of Chroma's styles. This PR introduces a `chroma-style-diff.go` tool to compare the diff. The missing CSS styles have been added manually. They are left as empty to reduce arguments because there was no color for them before. And this PR fixes #22348, with just 2 lines changed: `.chroma .kt & .n`, these colors are taken from GitHub. It's good enough for #22348 ![image](https://user-images.githubusercontent.com/2114189/221551941-0d27d11d-e71e-498f-8e88-92b558fe4a18.png) --------- Co-authored-by: silverwind <me@silverwind.io>
The CSS styles in Gitea themes are out-of-sync of Chroma's styles. This PR introduces a `chroma-style-diff.go` tool to compare the diff. The missing CSS styles have been added manually. They are left as empty to reduce arguments because there was no color for them before. And this PR fixes go-gitea#22348, with just 2 lines changed: `.chroma .kt & .n`, these colors are taken from GitHub. It's good enough for go-gitea#22348 ![image](https://user-images.githubusercontent.com/2114189/221551941-0d27d11d-e71e-498f-8e88-92b558fe4a18.png) --------- Co-authored-by: silverwind <me@silverwind.io>
Backport #23174 The CSS styles in Gitea themes are out-of-sync of Chroma's styles. This PR introduces a `chroma-style-diff.go` tool to compare the diff. The missing CSS styles have been added manually. They are left as empty to reduce arguments because there was no color for them before. And this PR fixes #22348, with just 2 lines changed: `.chroma .kt & .n`, these colors are taken from GitHub. It's good enough for #22348 ![image](https://user-images.githubusercontent.com/2114189/221551941-0d27d11d-e71e-498f-8e88-92b558fe4a18.png) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
Description
From 1.17.1 to 1.17.2, syntax highlighting when viewing files in the
arc-green
theme changed in such a way that many parts of the code are assigned the same orange color. This is inconsistent with both thegitea
theme and the wayarc-green
behaves when editing files.For instance, in screenshot [1], regular identifiers use the regular text color, and special identifiers like function names and built-in types get a special color. In screenshot [2], all of these identifiers get the same orange color. In all of the code files I have looked at, the majority of the text was orange rather than the regular gray text color. This does not happen when editing files [3]. The light theme also uses regular text color for regular identifiers and special colors for special identifiers [4].
Syntax highlighting when viewing files in the
arc-green
theme seems to work the same way in1.18.0
as it does in1.17.2
Screenshots
[1] 1.17.1 - arc-green - view file
[2] 1.17.2 - arc-green - view file
[3] 1.17.2 - arc-green - edit file
[4] 1.17.2 - gitea - view file
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
No response
Browser Version
Chromium Version 108.0.5359.124 (Official Build) Arch Linux (64-bit)
The text was updated successfully, but these errors were encountered: