Skip to content

Commit b604f05

Browse files
author
Yury Shapkarin
committed
a little better regexp
1 parent cf18872 commit b604f05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/initialize.js

Lines changed: 3 additions & 3 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]+|\*/ig);
225-
const key = match[0] + (match[1] ? '*' : '');
226-
result[key] = prop.match(/:(.[a-z0-9]+)/i)[1]
224+
const match = prop.match(/^[a-z0-9]+|:(.[a-z0-9]+)|\*/ig);
225+
const key = match[0] + (match[2] ? '*' : '');
226+
result[key] = match[1].substring(1)
227227
}
228228
}
229229

0 commit comments

Comments
 (0)