Sublime Forum

Ruby 'gem' identifier breaks syntax highlight

#1

Hello,

At build 2196 (nightly) and even before, I started to notice that ‘gem’ keyword is affecting the entire file syntax afterwards.

One simple example:

[code]def something(value = nil)
if value
return true
end
end

def broken(gem)

now all following lines are all itallic

if gem
puts “foo!”
end
end
[/code]

It gets worse using the Monokai color scheme.

I believe this is caused by ‘gem’ is considered a special method/keyword.

On a sidenote, wouldn’t be great have the default packages on Git so others can fork and send the modifications back?

Thank you.

0 Likes

#2

I’m having the same issue. It’s pretty easy to fix, (just remove gem from the .tmLanguage file) but still really annoying.

Yeah, that would be a great idea!

0 Likes