Skip to content

Syntax Highlighting Errors when Diffing - Fixed Format Fortran #19684

Closed
@smf007

Description

@smf007

Description

The chroma library had added a fixed format fortran syntax highlighter back in version v0.9.2, which gitea started using as of v1.15.0-RC1. The fortran fixed format syntax highlighting works for displaying files in gitea, however it is broken when displaying a diff of changes.

This can be see using the try.gitea portal:

The syntax highlighting is correct
https://try.gitea.io/test1765/fortran_test/src/branch/main/fortran_fixed.f

The syntax highlighting is incorrect when doing a diff
https://try.gitea.io/test1765/fortran_test/commit/228401fa1860d7aea71f3511937e49ee39d10938

Gitea Version

Tried both 1.16.4, 1.16.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

See https://try.gitea.io/test1765/fortran_test/commit/228401fa1860d7aea71f3511937e49ee39d10938

Git Version

No response

Operating System

ROCKY 8.5 (RHEL 8.5)

How are you running Gitea?

Used pre-built binaries for Linux x64, running on ROCKY Linux 8.5.

Database

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailissue/workaroundit is or has a workaroundtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions