Skip to content

Commit/Editor diff preview for .sql files does not handle multiple line highlighting correctly #35999

@JpMand

Description

@JpMand

Description

When viewing the Diff of a .sql file (either from commit or PR ) some lines of the script that contains actual sql code (instead of comment) are highlighted as comment and sometimes also renders comments as actual code

Behavior of the render differs between the normal diff, the expanded diff code and the preview diff during edit from web (multiline comment is rendered different between commit diff and preview diff)

It could be a leftover from #33358

I am able to reproduce in the Gitea demo instance.
Repository used for testing: https://demo.gitea.com/JpMand/idea-plugin-demo-repo

Gitea Version

1.25.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image 2 Image 3 Image

Git Version

No response

Operating System

No response

How are you running Gitea?

I'm using https://demo.gitea.com

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions