Sublime Forum

[BUG] Whitespace take colour of comments

#1

There’s a bug in which whitespace characters, when the option all is set, take the colour of block comments, beginning from the second line.

0 Likes

#2

The white space characters are drawn by blending the normal foreground colour with the background. In the default colour scheme (monokai), this will generally result in a colour similar to the comment colour. You can see the colour used for the white space characters changing within string literals, for example.

If this isn’t what you’re seeing, then a screen shot or sample file would be appreciated.

0 Likes

#3

As you can see in the image attached, beginning from the second line of a block comment whitespace characters take the colour of comments (which is different from the colour of whitespace characters).

0 Likes

#4

The spaces in the region marked ‘bad’ are part of the block comment, so they’re drawn using the comment colour: this is intentional, otherwise areas drawn with a different background colour would run the risk of hiding the visible white space.

0 Likes

#5

Yes, you’re right! I overlooked that the colour changes in other parts too. :smile:

But, and sorry if I am annoying, take for example an html file: using monokai, html elements are pink, attributes are green. The spaces between attributes should be of the same colour (green). With function arguments in javascript, spaces between arguments are of the same colour of the arguments. Is there a pattern that I don’t see or it’s a little messed up?

0 Likes