billymoon / Stylus

Stylus Package for Sublime Text 2 / 3
Other
129 stars 31 forks source link

Misleading highlighting of comments that are none #17

Closed nh2 closed 10 years ago

nh2 commented 11 years ago

In stylus,

  .myclass // my comment
    color: red

is not comment! Comments in stylus must be on their own line.

Yet the Sublime Stylus package renders my comment in grey as a comment, which is of course absolutely misleading, since the above will be rendered to CSS as:

.myclass // my comment { color: red }

Thanks!

greduan commented 11 years ago

@billymoon I can confirm this behavior, and would like this fixed, just so that people don't get confused. :)

samuelmesq commented 11 years ago

@nh2 this is a comment, but stylus compiler don't understood this. this error only happens with class, I recommend opening an issue in stylus project.

nfour commented 11 years ago

Didn't know comments couldn't be suffixed to the end of lines - Ill pull the .tmLanguage to clear this up.

nh2 commented 11 years ago

@samuelmesq Can you point us to a place on the stylus website (I don't want to call it spec) that claims that this should be a comment?

(Not saying that I wouldn't want it to be one, but I think it isnt.)

greduan commented 11 years ago

@nh2 It isn't a comment. The parser doesn't parse it as a comment. This issue is to fix the fact it was being highlighted as a comment, even though it doesn't work that way. :)