kdl-org / vscode-kdl

VS Code syntax highlighting for KDL
24 stars 3 forks source link

Equals sign (=) in string breaks highlighting #7

Open sargunv opened 3 years ago

sargunv commented 3 years ago

Example text

command "twitter" "tw" url="https://twitter.com/" {
    match regexp="^@(?<username>[A-Za-z_]+)$" url="https://twitter.com/{username}" encoding="path"
    default url="https://twitter.com/search?q={}" encoding="query"
}

image

If I remove the = from the string, it looks fine:

image

eugenesvk commented 1 year ago

I think that's because this line doesn't exclude invalid chars like = from matching in attributes, so instead of stopping at the first invalid char = it matches everything until the last =

https://github.com/kdl-org/vscode-kdl/blob/646d7b819d72b2f0d9dd05102a305506bafa3cf6/syntaxes/kdl.tmLanguage.json#L101