Emacs-Kotlin-Mode-Maintainers/kotlin-mode

Syntax highlighting thrown off by double quote between single quotes

Ruin0x11 opened this issue · 2 comments

In Kotlin a pair of single quotes denotes a character, but there is no handling for the case of a double quote inside the single quotes, leading to this:

image

Here is the code.

fun test() {
    val char = myChar()
    if (char == '"') {
        println("Got double quote.")
    }
}

Same thing happens for multiline strings and a double quote inside.

This was partially fixed by #42 but the multiline string portion is not yet resolved.