Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Incorrect Highlighting of List With String Element First in a Macro #63

Open
mjbvz opened this issue Apr 12, 2017 · 2 comments
Open

Incorrect Highlighting of List With String Element First in a Macro #63

mjbvz opened this issue Apr 12, 2017 · 2 comments

Comments

@mjbvz
Copy link

mjbvz commented Apr 12, 2017

From: microsoft/vscode#24603

Bug

For the Clojure macro:

({:xyz ("a b", "c d")})

The first string element of the list breaks syntax highlighting

screen shot 2017-04-12 at 1 14 04 pm

@vadim0x60 provided some more info about this bug here: microsoft/vscode#24603 (comment)

Versions

  • 1.15

Edit by @rsese to add examples from #79

screen shot 2018-10-24 at 10 58 49 am

("foo" "bar" "baz")

The first element of the list is being highlighted as a function, when it should be highlighted as a string like the others.

For numbers, the highlighting is correct:

screen shot 2018-10-24 at 11 06 02 am

Reproduced on 1.34.0-nightly5 with macOS 10.12.6.

Here is a fuller example illustrating the behavior:

(case "bar")
  ("foo" "bar") 1
  "baz" 2
  ("how are you" "test") 3)

image

Notice that "foo" and "how" are blue, "bar" and "baz" are green, and "are you" and "test" are gray. Also, 1 and 2 are orange and 3 is green.

@eskemojoe007
Copy link

This has been open a while, and I just ran across it as a major issue to some of my files with the case command as shown in the original post.

@Carl-Elder-Porter-IV
Copy link

This issue is significantly more impactful when case matching grouped strings with spaces in them. It will cascade throughout all code below it.
For example:

(case my-string
    ("foo 1" "foo 2" "foo 3")
    "group 1"
    ("foo4" "foo5" "foo6"
    "group 2"
    "default")

All code below this will be highlighted as a string, except for strings. This also breaks proto-repl code block sending.

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

No branches or pull requests

5 participants