Sublime Forum

Ruby syntax highlighting failing with simple test case

#1

The below ruby code fragment stops highlighting properly at the first occurrence of @days_in_year.

I am sure this used to work because I wrote the file using Sublime. I have confirmed that it works with 3126 on another computer and I am on 3132 on mine.

If I get rid of the “@” in front of days_in_year, the problem goes away.

Any ideas what I might need to do?

class DateRange

  def pro_rata(amount)
    if @split_year
      (@days_in_range[0] * (amount / @days_in_year[0])) + (@days_in_range[1] * (amount / @days_in_year[1]))
    else
      @days_in_range * (amount / @days_in_year)
    end
  end
end

0 Likes

#2

You’ll need to wait for a fix to ST’s syntax definition, unless you know how to do it yourself

0 Likes

#3

OK - cool. Known problem.

Thanks.

Maybe I will have a look.

0 Likes