You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the second regex capture group doesn't include numbers; note that the current regex works fine where two or more letters precede the number:
issue in the master revision at time of writing: https://github.com/dcodeIO/protobuf.js/blob/2a74fbf551e934b3212273e6a28ad65ac4436faf/src/parse.js
camelCase(time_t0)
-->timeT0
(expected)camelCase(time_t0)
-->time_t0
(actual)Repro
From
parse.js
, copy this snippet into Chrome dev tools:Then evaluate:
Root Cause
The issue is that the second regex capture group doesn't include numbers; note that the current regex works fine where two or more letters precede the number:
Not sure why the current regex checks two characters after the underscore—could it perhaps be reworked to only check the one? cf. Google's C++ implementation, which simply checks that the letter immediately following the underscore is in range
a-z
: https://github.com/google/protobuf/blob/7f3e23707122f31ebfa58b7280bd56cbe77cb44e/src/google/protobuf/util/field_mask_util.cc#L63The text was updated successfully, but these errors were encountered: