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

Kotlin Syntax highlighting #2222

Open
abentele opened this issue Oct 24, 2024 · 1 comment
Open

Kotlin Syntax highlighting #2222

abentele opened this issue Oct 24, 2024 · 1 comment

Comments

@abentele
Copy link

abentele commented Oct 24, 2024

assume this valid Kotlin Unit test class:

import org.junit.jupiter.api.Test

class Test {

    @Test
    fun `test if Kotlin syntax highlighting doesn't stop at this point`() {
        println("this is valid Kotlin code but not highlighted as expected in git fork")
    }
}

While I normally don't use this style of method name, in unit tests I've used to use them heavily, to be able to describe the test in a more natural way.

I've used an apostrophe in the method name ("doesn't"), which is allowed in Kotlin.

The syntax highlighting in the details view is not correct, as you can see in the screenshot:

screenshot

This bug applies to git fork Version 2.46.2 on macOS 15.0.1.

By the way: the "if" in the method name is rendered like it would be a keyword, but is not in this context.

The main problem is that everything in the file below this apostrophe is highlighted in blue, i.e. the syntax highlighting is broken for everything below.

@abentele
Copy link
Author

btw: I observed similar problems in Typesscript/React (tsx) files. If wanted, I can feed you with details via another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant