lib/textbringer/modes/ruby_mode.rb in textbringer-0.3.1 vs lib/textbringer/modes/ruby_mode.rb in textbringer-0.3.2

- old
+ new

@@ -275,10 +275,10 @@ _, prev_event, _ = tokens[i - 1] next if prev_event == :on_symbeg case text when "class", "module", "def", "if", "unless", "case", "do", "for", "while", "until", "begin" - if /\A(if|unless|while|until)\z/ =~ text + if /\A(if|unless|while|until)\z/.match?(text) ts = tokens[0...i].reverse_each.take_while { |(l,_),| l == line } t = ts.find { |_, e| e != :on_sp } next if t && !(t[1] == :on_op && t[2] == "=") end if stack.empty?