Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was 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

Description

@mjbvz

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.

Activity

  1. eskemojoe007 commented on Apr 18, 2019

    @eskemojoe007

    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.

  2. Carl-Elder-Porter-IV commented on Apr 15, 2021

    @Carl-Elder-Porter-IV

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions