GitGalaxy's assignment regex tries to step over optional type annotations. Because the skip is optional and uses a non-consuming lookahead (?=...), the engine can falsely anchor on the last word of a complex type annotation that precedes the = sign (e.g., capturing B in reduce: <A, B>(...) => B = ...), rather than the actual variable name.
GitGalaxy's assignment regex tries to step over optional type annotations. Because the skip is optional and uses a non-consuming lookahead
(?=...), the engine can falsely anchor on the last word of a complex type annotation that precedes the=sign (e.g., capturingBinreduce: <A, B>(...) => B = ...), rather than the actual variable name.