Add guard in regexp to allow multiple lambdas on one line.
Previously, (a) -> (b) -> would match (a) with b's arrow, resulting in a's arrow not getting highlighted by font-lock. This fixes the issue, and shouldn't create any more problems (it handles lambdas as default arguments, e.g. a = (f = (b) ->) -> as well).
old:
new:
If you look closely and check what it matches for the string a = (f = (b) ->) ->, it really doesn't handle lambdas as default arguments appropriately (it should be using a backreference), but it still works:
Add guard in regexp to allow multiple lambdas on one line.
Previously,
(a) -> (b) ->
would match(a)
withb
's arrow, resulting ina
's arrow not getting highlighted byfont-lock
. This fixes the issue, and shouldn't create any more problems (it handles lambdas as default arguments, e.g.a = (f = (b) ->) ->
as well).old: new:
If you look closely and check what it matches for the string
a = (f = (b) ->) ->
, it really doesn't handle lambdas as default arguments appropriately (it should be using a backreference), but it still works: