Syntax Highlighting in arc-green Colors all Identifiers in Orange #10061

Closed
opened 2025-11-02 08:57:10 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @julmb on GitHub (Jan 5, 2023).

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 the gitea theme and the way arc-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 in 1.18.0 as it does in 1.17.2

Screenshots

[1] 1.17.1 - arc-green - view file
image
[2] 1.17.2 - arc-green - view file
image
[3] 1.17.2 - arc-green - edit file
image
[4] 1.17.2 - gitea - view file
image

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)

Originally created by @julmb on GitHub (Jan 5, 2023). ### 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 the `gitea` theme and the way `arc-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 in `1.18.0` as it does in `1.17.2` ### Screenshots [1] 1.17.1 - arc-green - view file ![image](https://user-images.githubusercontent.com/11631652/210756264-3094177b-cee3-4000-9184-c125ce61255e.png) [2] 1.17.2 - arc-green - view file ![image](https://user-images.githubusercontent.com/11631652/210756505-b389e6fb-377c-4c69-8364-47b49ab68f90.png) [3] 1.17.2 - arc-green - edit file ![image](https://user-images.githubusercontent.com/11631652/210756790-e8da3824-9d2c-4c38-9dac-49388792ff35.png) [4] 1.17.2 - gitea - view file ![image](https://user-images.githubusercontent.com/11631652/210757149-6a5f390b-91f8-43a9-afee-67eca0af0b0f.png) ### 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)
GiteaMirror added the topic/uitype/bug labels 2025-11-02 08:57:10 -06:00
Author
Owner

@silverwind commented on GitHub (Jan 5, 2023):

Likely a C++ specific issue. Can you push an example to https://try.gitea.io/?

@silverwind commented on GitHub (Jan 5, 2023): Likely a C++ specific issue. Can you push an example to https://try.gitea.io/?
Author
Owner

@wxiaoguang commented on GitHub (Jan 6, 2023):

https://try.gitea.io/wxiaoguang/test/src/branch/master/test.cpp

kt and n use the same color in arc-green.

image

@wxiaoguang commented on GitHub (Jan 6, 2023): https://try.gitea.io/wxiaoguang/test/src/branch/master/test.cpp `kt` and `n` use the same color in arc-green. ![image](https://user-images.githubusercontent.com/2114189/210919787-006e29ba-4ee4-4206-89a3-eabbf36eb30c.png)
Author
Owner

@julmb commented on GitHub (Jan 9, 2023):

Likely a C++ specific issue. Can you push an example to https://try.gitea.io/?

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:
https://try.gitea.io/jules/highlighting-test/src/branch/main/main.cpp
https://try.gitea.io/jules/highlighting-test/src/branch/main/Main.hs
https://try.gitea.io/jules/highlighting-test/src/branch/main/main.java
https://try.gitea.io/jules/highlighting-test/src/branch/main/main.py

All of these have the distinct "everything is orange" look, where all identifiers are assigned the same color.

@julmb commented on GitHub (Jan 9, 2023): > Likely a C++ specific issue. Can you push an example to https://try.gitea.io/? 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: https://try.gitea.io/jules/highlighting-test/src/branch/main/main.cpp https://try.gitea.io/jules/highlighting-test/src/branch/main/Main.hs https://try.gitea.io/jules/highlighting-test/src/branch/main/main.java https://try.gitea.io/jules/highlighting-test/src/branch/main/main.py All of these have the distinct "everything is orange" look, where all identifiers are assigned the same color.
Author
Owner

@wxiaoguang commented on GitHub (Feb 25, 2023):

Fix broken highlight styles #23148

@wxiaoguang commented on GitHub (Feb 25, 2023): Fix broken highlight styles #23148
Author
Owner

@stuzer05 commented on GitHub (Mar 8, 2023):

@lunny @delvh Should this issue be in 1.20.0 milestone, not in 1.19.0? The only not closed pr referencing this issue has 1.20.0 milestone and here's no backport flair anymore

@stuzer05 commented on GitHub (Mar 8, 2023): @lunny @delvh Should this issue be in 1.20.0 milestone, not in 1.19.0? The only not closed pr referencing this issue has 1.20.0 milestone and here's no backport flair anymore
Author
Owner

@lunny commented on GitHub (Mar 8, 2023):

@lunny @delvh Should this issue be in 1.20.0 milestone, not in 1.19.0? The only not closed pr referencing this issue has 1.20.0 milestone and here's no backport flair anymore

@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

@lunny commented on GitHub (Mar 8, 2023): > @lunny @delvh Should this issue be in 1.20.0 milestone, not in 1.19.0? The only not closed pr referencing this issue has 1.20.0 milestone and here's no backport flair anymore @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
Author
Owner

@wxiaoguang commented on GitHub (Mar 9, 2023):

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.

@wxiaoguang commented on GitHub (Mar 9, 2023): 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.
Author
Owner

@silverwind commented on GitHub (Mar 9, 2023):

Yeah I will have look shortly. Agree it's not blocking 1.19 because IIRC the issue is present on 1.18 as well.

@silverwind commented on GitHub (Mar 9, 2023): Yeah I will have look shortly. Agree it's not blocking 1.19 because IIRC the issue is present on 1.18 as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10061