A comment turns off subsequent SASS highlighting #1

Open
Bill opened this Issue Aug 31, 2009 · 15 comments

Comments

Projects
None yet
4 participants
@Bill

Bill commented Aug 31, 2009

This SASS does not get highlighted. Removing the comment on the first line, makes highlighting work again.


//
=featured
  color = !featured_text_color

@cannikin

This comment has been minimized.

Show comment Hide comment
@cannikin

cannikin Oct 5, 2009

There are two things you can do to fix this:

  • Insert a blank line after your comment and highlighting will turn back on
  • Edit the bundle: change line 163 where it tells the bundle what to consider the end of the comment block. '^$' means a blank line, changing it to '$' means the end of the current line.

cannikin commented Oct 5, 2009

There are two things you can do to fix this:

  • Insert a blank line after your comment and highlighting will turn back on
  • Edit the bundle: change line 163 where it tells the bundle what to consider the end of the comment block. '^$' means a blank line, changing it to '$' means the end of the current line.
@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 10, 2009

Contributor

Removing the caret as you suggest works, but it causes for nested 'loud comments' to no longer get scoped as a comment. Do you know what would be required to get them scoped as comments also? The start pattern would be slash followed by a star and the end pattern would be the first line encountered that is NOT indented.

Contributor

charlesroper commented Oct 10, 2009

Removing the caret as you suggest works, but it causes for nested 'loud comments' to no longer get scoped as a comment. Do you know what would be required to get them scoped as comments also? The start pattern would be slash followed by a star and the end pattern would be the first line encountered that is NOT indented.

@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 10, 2009

Contributor

^(?! ) did the trick: http://github.com/charlesr/ruby-sass-tmbundle/commit/73556bf7b45edbdad89c42bb09552dbc10421ec2

I've pushed this fix to my fork; will also issue a pull request.

Contributor

charlesroper commented Oct 10, 2009

^(?! ) did the trick: http://github.com/charlesr/ruby-sass-tmbundle/commit/73556bf7b45edbdad89c42bb09552dbc10421ec2

I've pushed this fix to my fork; will also issue a pull request.

@Bill

This comment has been minimized.

Show comment Hide comment
@Bill

Bill Oct 12, 2009

Well I think that improves the situation. However this still does not get highlighted:

//
  =featured
    color = !featured_text_color

If I indent that comment (to match the indention of the subsequent macro definition) the highlighting lights up.

Bill commented Oct 12, 2009

Well I think that improves the situation. However this still does not get highlighted:

//
  =featured
    color = !featured_text_color

If I indent that comment (to match the indention of the subsequent macro definition) the highlighting lights up.

@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 12, 2009

Contributor

Have you tried the latest updates on my fork that incorporate fixes by Matt Pizzimenti @mjpizz?

Contributor

charlesroper commented Oct 12, 2009

Have you tried the latest updates on my fork that incorporate fixes by Matt Pizzimenti @mjpizz?

@Bill

This comment has been minimized.

Show comment Hide comment
@Bill

Bill Oct 12, 2009

I just did this:
git clone git://github.com/charlesr/ruby-sass-tmbundle.git "Ruby Sass.tmbundle"
And can confirm that the example above is still broken. For example, this does not highlight:
// foo
a
color: red

Bill commented Oct 12, 2009

I just did this:
git clone git://github.com/charlesr/ruby-sass-tmbundle.git "Ruby Sass.tmbundle"
And can confirm that the example above is still broken. For example, this does not highlight:
// foo
a
color: red

@cannikin

This comment has been minimized.

Show comment Hide comment
@cannikin

cannikin Oct 12, 2009

Everything should be a gray comment in that example. Indenting beneath a comment makes everything indented a comment.

In this example, everything under the comment should NOT be highlighted as a comment (but is, even with charlesr's fork):

/ foo
a
  color: red

Everything should be a gray comment in that example. Indenting beneath a comment makes everything indented a comment.

In this example, everything under the comment should NOT be highlighted as a comment (but is, even with charlesr's fork):

/ foo
a
  color: red
@Bill

This comment has been minimized.

Show comment Hide comment
@Bill

Bill Oct 12, 2009

Gracious! You're right. That is so wierd. But you've fixed a bug in my code. Thanks!

http://sass-lang.com/docs/yardoc/SASS_REFERENCE.md.html#sass_comments_

Bill commented Oct 12, 2009

Gracious! You're right. That is so wierd. But you've fixed a bug in my code. Thanks!

http://sass-lang.com/docs/yardoc/SASS_REFERENCE.md.html#sass_comments_

@cannikin

This comment has been minimized.

Show comment Hide comment
@cannikin

cannikin Oct 12, 2009

You're welcome! :) Yeah, if you follow the SASS bundle then you'll think things are commented out when they're not. I hope someone repairs the bundle to show what is truly considered a comment by the SASS engine (the entire line that contains a comment and anything that is indented under that comment ONLY).

You're welcome! :) Yeah, if you follow the SASS bundle then you'll think things are commented out when they're not. I hope someone repairs the bundle to show what is truly considered a comment by the SASS engine (the entire line that contains a comment and anything that is indented under that comment ONLY).

@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 13, 2009

Contributor

@cannikin, in your example there's only one slash before the 'foo' - is that a typo or did you intend it that way? That example is working fine for me in E Text Editor - everything under the comment is not being highlighted.

I've pushed another update to my fork because I noticed CSS 'loud comments' no longer worked. I've also updated the testhighlight.sass file to reflect the examples in the Sass docs. For me in E, everything is highlighting as it should. Would appreciate feedback on what it looks like in TM. Cheers.

Contributor

charlesroper commented Oct 13, 2009

@cannikin, in your example there's only one slash before the 'foo' - is that a typo or did you intend it that way? That example is working fine for me in E Text Editor - everything under the comment is not being highlighted.

I've pushed another update to my fork because I noticed CSS 'loud comments' no longer worked. I've also updated the testhighlight.sass file to reflect the examples in the Sass docs. For me in E, everything is highlighting as it should. Would appreciate feedback on what it looks like in TM. Cheers.

@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 14, 2009

Contributor

I've updated the testhighlight.sass file and checked the highlighting in both E and Sublime and both work as expected. I think we can close this unless there are still problems on TM?

Contributor

charlesroper commented Oct 14, 2009

I've updated the testhighlight.sass file and checked the highlighting in both E and Sublime and both work as expected. I think we can close this unless there are still problems on TM?

@Bill

This comment has been minimized.

Show comment Hide comment
@Bill

Bill Oct 14, 2009

@CharlesR are you the new maintainer @ausiegeek asked for? If so then I agree we can close this, otherwise I move we keep it open until the fix is migrated to the maintainer's repo.

Bill commented Oct 14, 2009

@CharlesR are you the new maintainer @ausiegeek asked for? If so then I agree we can close this, otherwise I move we keep it open until the fix is migrated to the maintainer's repo.

@cannikin

This comment has been minimized.

Show comment Hide comment
@cannikin

cannikin Oct 14, 2009

Yep, things look good for me, close away!

Yep, things look good for me, close away!

@charlesroper

This comment has been minimized.

Show comment Hide comment
@charlesroper

charlesroper Oct 14, 2009

Contributor

@Bill, good point, @aussiegeek hasn't merged in the fixes yet.

Contributor

charlesroper commented Oct 14, 2009

@Bill, good point, @aussiegeek hasn't merged in the fixes yet.

@arta

This comment has been minimized.

Show comment Hide comment
@arta

arta Feb 13, 2010

Hmm, nobody uses one-line comments following the declaration, which .css allows? (and http://github.com/seaofclouds/sass-textmate-bundle does too.) I use them on occasion:

.selector
  property: value /* comment */

arta commented Feb 13, 2010

Hmm, nobody uses one-line comments following the declaration, which .css allows? (and http://github.com/seaofclouds/sass-textmate-bundle does too.) I use them on occasion:

.selector
  property: value /* comment */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment