Diff view doesn't detect doc-style comment in Scala code #8408

Closed
opened 2025-11-02 08:05:06 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @mal-tee on GitHub (Jan 25, 2022).

Gitea Version

1.17.0+dev-37-g93250bfe2 and 1.15.6

Operating System

Ubuntu 21.10

Browser Version

Firefox 96

Can you reproduce the bug on the Gitea demo site?

Yes

Description

The syntax highlighting doesn't pick up this comment in the diff view:

9e168abc65

image

the regular view is ok:

image

Screenshots

see above

Originally created by @mal-tee on GitHub (Jan 25, 2022). ### Gitea Version 1.17.0+dev-37-g93250bfe2 and 1.15.6 ### Operating System Ubuntu 21.10 ### Browser Version Firefox 96 ### Can you reproduce the bug on the Gitea demo site? Yes ### Description The syntax highlighting doesn't pick up this comment in the diff view: https://try.gitea.io/mal-tee/test/commit/9e168abc6591937b6f644f3bc2691612e7d97f2b ![image](https://user-images.githubusercontent.com/45886910/151013399-945dcd6f-0e05-405f-8adc-f3df71124e13.png) the regular view is ok: ![image](https://user-images.githubusercontent.com/45886910/151013480-b2f9fc82-1f41-4245-98e5-c5ed5adaabc4.png) ### Screenshots see above
GiteaMirror added the issue/confirmedtype/bugissue/duplicate labels 2025-11-02 08:05:06 -06:00
Author
Owner

@silverwind commented on GitHub (Jan 26, 2022):

IIRC, this is because diff content is fed to the chroma syntax highlighter line-per-line, so multi-line things like these doc blocks can not correctly highlight. We need to change this so diff content is passed as multi-line to the syntax highlighter.

@silverwind commented on GitHub (Jan 26, 2022): IIRC, this is because diff content is fed to the `chroma` syntax highlighter line-per-line, so multi-line things like these doc blocks can not correctly highlight. We need to change this so diff content is passed as multi-line to the syntax highlighter.
Author
Owner

@lunny commented on GitHub (Jan 26, 2024):

duplicated #23176

@lunny commented on GitHub (Jan 26, 2024): duplicated #23176
Author
Owner

@github-actions[bot] commented on GitHub (Feb 29, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 29, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8408