Join GitHub today
Syntax highlight bug when division arguments are on different lines #171
Hmm, this is a tricky one. The problem is that there is no unambigous way to parse this without backtracking (that I can think of). This would be perfectly valid:
a = calculate(90).and_some_long_expression / and_long_expression_here / puts a
And it would mean calling
a = calculate(90).and_some_long_expression / and_long_expression_here / 5 puts a
would also be perfectly valid and it would parse as two divisions...
I'm not very familiar with Vim's syntax highlighting, so maybe there is a way to differentiate, but I can't think of anything.
The particular commit that introduces this "problem" is 971d932 by @tpope. But the old version of this highlighting basically had a special case for
I'll think about the issue some more, but I'm afraid I can't promise anything. Regexes are hard.