atom / language-clojure

Clojure package for Atom
Other
49 stars 48 forks source link

Syntax highlighting when string is first element of list #79

Closed smithtim closed 5 years ago

smithtim commented 5 years ago

Edit by @rsese to add issue template

Prerequisites

Description

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

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

Steps to Reproduce

  1. Create a test.clj file with the content:
("foo" "bar" "baz")

Expected behavior: [What you expect to happen]

All 3 strings to be colored the same.

Actual behavior: [What actually happens]

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

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

atom-nightly -v
Atom    : 1.34.0-nightly5
Electron: 2.0.11
Chrome  : 61.0.3163.100
Node    : 8.9.3

macOS 10.12.6


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

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

atom version: 1.32.0 language-clojure version: 0.22.7

rsese commented 5 years ago

Thanks for the report! I can reproduce this highlighting with ("foo" "bar" "baz") on macOS 10.12.6 with 1.34.0-nightly5. Do you think https://github.com/atom/language-clojure/issues/63 is the same, or different but similar issue?

Also, for future issues please use the issue template, the information in the template is super helpful for us when triaging issues.

smithtim commented 5 years ago

63 may be the same issue. Perhaps the two could be merged by combining the examples from each? Here is a fuller example illustrating the behavior:

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.

rsese commented 5 years ago

63 may be the same issue. Perhaps the two could be merged by combining the examples from each? Here is a fuller example illustrating the behavior:

Thanks I'll go ahead and do that :+1:, we can always reopen this if necessary.