Skip to content

Commit 1ee745b

Browse files
author
Yury Shapkarin
committed
much better regexp
1 parent 648f073 commit 1ee745b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/initialize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ program
221221

222222
for (prop of propNames){
223223
if(/:/.test(prop)){
224-
const match = prop.match(/^[a-z0-9]+|:.[a-z0-9]+|\*/ig);
224+
const match = prop.match(/^[a-z0-9]+|(?<=:).[a-z0-9]+|\*/ig);
225225
const key = match[0] + (match[2] ? '*' : '');
226-
result[key] = match[1].substring(1)
226+
result[key] = match[1]
227227
}
228228
}
229229

0 commit comments

Comments
 (0)