vscode-kdl icon indicating copy to clipboard operation
vscode-kdl copied to clipboard

Slashdash comment breaks when string values contain a closing curly brace

Open sargunv opened this issue 3 years ago • 2 comments

image

example text:

/-command "twitter" "tw" {
    rules {
        // profiles (format: @username)
        custom "https://twitter.com/{/username}" \
            regexp="^@(?P<username>[A-Za-z_]+)$"

        noargs "https://twitter.com"
        freeform "https://twitter.com/search?q={ARGS}"
    }

    tests {
        case "tw" "https://twitter.com"
        case "tw @sargunv" "https://twitter.com/sargunv"
        case "tw sargun vohra" "https://twitter.com/search?q=sargun%20vohra"
    }
}

sargunv avatar Sep 29 '21 07:09 sargunv

It seems like it just breaks if you start the line with slash dash in general.

binhonglee avatar Oct 04 '21 03:10 binhonglee

I'm using the KDL plugin version ~~1.1.0~~ 1.3.1 on VSCodium. Slashdash comments at the beginning of a line or at the beginning of a curly brace seem to terminate at the first closing curly brace, regardless of nesting.

In the following screenshots, the comment is supposed to reach all the way down to the very bottom but it only gets to the first closing curly brace.

kdl-vscodium-1 kdl-vscodium-2

Also, if the first closing curly brace is within a string, it completely breaks syntax highlighting for the rest of the following document. The ending quote (") of the string is interpreted as the starting quote of a new string.

kdl-vscodium-3

I feel like these problems are related to the issues discussed earlier in this thread so I didn't open a new issue for that.


Edit: I updated the plugin from 1.1.0 to 1.3.1 which has the same issues.

errhammr avatar Apr 22 '22 14:04 errhammr