Sublime Forum

Bug in Ruby Syntax Highlighting for RegExp Character Classes

#1

So this is only visible in certain color schemes, but it’s a bit annoying.

Simply paste the following into a new file and set the syntax to Ruby:

class MyClass
   REGEX = /\A[[:space:]]\z/
end

You will notice the first square bracket and the third are colored the same, and the second and forth are likewise. However, the first/fourth and second/third should be matching instead.

If you are on a color scheme where all of the square brackets look alike, try “Sixteen” (the built-in color scheme on which this is most obvious.

A screenshot is attached. This occurs on the latest version of ST3 on both Windows and Linux.

0 Likes