HTD / NST

New Source Tree Komodo Addon
32 stars 20 forks source link

FIXED: if/unless one-liners after trailing backslash in ruby #37

Closed mudasobwa closed 9 years ago

mudasobwa commented 10 years ago

Trailing backslashes were not handled, forcing if/unless one-liners break the depth counters.

def f1
  puts 'Breaking the depth…' \
    unless true
#   ↑↑↑↑↑↑ here we ran into troubles with depth, since it was incremented
end

def f2
  # code
end

Fixed by introducing new wait_for regexp, similar to =begin/=end. This is probably not the most elegant way of doing this, but I didn’t want to interfere too much into your code.