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

Syntax highlighting in blame mode broken (or different from normal mode) for some files #24383

Open
eric-j-ason opened this issue Apr 27, 2023 · 4 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@eric-j-ason
Copy link

eric-j-ason commented Apr 27, 2023

Description

Some files get highlighted differently when viewed in blame mode as compared to when viewed in normal mode. Example.

Most files beginning with #!/usr/bin/env bash do not get highlighted at all in blame mode. Example. I found one example of #!/usr/bin/env bash that does get highlighted, but when I put the same file on my own server, the highlighting breaks also for that file.

Gitea Version

1.20.0+dev-566-g8cc60ee01

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

bild
bild

Git Version

Whatever is on <try.gitea.io>

Operating System

Whatever is on <try.gitea.io>

How are you running Gitea?

try.gitea.io

Database

None

@eric-j-ason eric-j-ason changed the title Syntax highlighting in blame mode broken for some files Syntax highlighting in blame mode broken (or different from normal mode) for some files Apr 27, 2023
@wxiaoguang
Copy link
Contributor

Dup of #23176 ?

@silverwind
Copy link
Member

silverwind commented Apr 27, 2023

Dup of #23176 ?

I think not. In the blame case, the highlighter has full content, so should produce the same highlighting as the file view.

@wxiaoguang
Copy link
Contributor

I guess "Blame" also renders the content block by block, no full content.

@silverwind
Copy link
Member

Yes, that should be fixed. It renders everything anyways, so can render all at once to get correct highlighting.

@silverwind silverwind added the topic/ui Change the appearance of the Gitea UI label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

3 participants