Skip to content

Highlighting constant names fails if a preceding comment ends in a dot #164

ngollan opened this Issue Jul 19, 2013 · 2 comments

3 participants

ngollan commented Jul 19, 2013
class Thing
  # The following constant gets highlighted properly
  CONST_A = 'hey'

  # ... buit this one doesn't.
  CONST_B = 'there'

  # this one works. a
  CONST_C = 'pretty'

  # as does this..
  CONST_D = 'horse'

Looks like the highlighter thinks CONST_B is a method to be called, ignoring that the preceding dot is inside a comment.

ngollan commented Jul 19, 2013

The culprit seems to be the change to rubyConstant in b60da6c

@dkearns dkearns was assigned Jul 19, 2013
@dkearns dkearns added a commit that closed this issue Jul 21, 2013
@dkearns dkearns Fix constant definitions after comments.
These multi-line edge cases are almost impossible to find in the wild so I won't bother
supporting most of them for now.

Closes #164.
@dkearns dkearns closed this in 082e929 Jul 21, 2013
janko-m commented Jul 24, 2013

Awesome! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.