Syntax highlighter does not detect comments in go code diffs #5786

Closed
opened 2025-11-02 06:35:59 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @silverwind on GitHub (Jul 26, 2020).

5d880baff1
https://gitea.com/gitea/go-sdk/src/branch/master/gitea/Issue_label_test.go

image
image

For some reason comments are not detected in diffs but are in the regular view. It does not seem to affect all languages as it works for JS for example. cc: @mrsdizzie

Originally created by @silverwind on GitHub (Jul 26, 2020). https://gitea.com/gitea/go-sdk/commit/5d880baff1e202b120156072a4096c93a95ac7ee https://gitea.com/gitea/go-sdk/src/branch/master/gitea/Issue_label_test.go ![image](https://user-images.githubusercontent.com/115237/88478472-eb453e00-cf48-11ea-8e22-dbb6ad8b6834.png) ![image](https://user-images.githubusercontent.com/115237/88478482-0c0d9380-cf49-11ea-954b-4e03a393ee0d.png) For some reason comments are not detected in diffs but are in the regular view. It does not seem to affect all languages as it works for JS for [example](https://try.gitea.io/silverwind/updates/commit/9f342114d7a6bb087ff777a983d0e03b41873b07). cc: @mrsdizzie
Author
Owner

@mrsdizzie commented on GitHub (Jul 26, 2020):

This is an upstream issue. I sent a PR to fix it that was merged (4da591c8f6) but will need a new release (https://github.com/alecthomas/chroma/issues/371)

@mrsdizzie commented on GitHub (Jul 26, 2020): This is an upstream issue. I sent a PR to fix it that was merged (https://github.com/alecthomas/chroma/commit/4da591c8f6258f012cf24d1335011981be9494c2) but will need a new release (https://github.com/alecthomas/chroma/issues/371)
Author
Owner

@silverwind commented on GitHub (Jul 26, 2020):

I see. I guess we could point our dependency to the latest commit on the master branch or just float your patch.

@silverwind commented on GitHub (Jul 26, 2020): I see. I guess we *could* point our dependency to the latest commit on the master branch or just float your patch.
Author
Owner

@mrsdizzie commented on GitHub (Jul 26, 2020):

If there hasn't been a new release when it comes time for us to make an rc for 1.13 we could point at latest commit then but hopefully there would be one before that.

@mrsdizzie commented on GitHub (Jul 26, 2020): If there hasn't been a new release when it comes time for us to make an rc for 1.13 we could point at latest commit then but hopefully there would be one before that.
Author
Owner

@silverwind commented on GitHub (Jul 26, 2020):

Ok, keeping this open for tracking. I guess the issue is rather annoying during code review 😉

I wonder if go was the only language affected.

@silverwind commented on GitHub (Jul 26, 2020): Ok, keeping this open for tracking. I guess the issue is rather annoying during code review 😉 I wonder if go was the only language affected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5786