Skip to content

Commit 9f5386a

Browse files
authored
refactor: use non-capturing groups
Use non-capturing groups because we don't need to manipulate the groups separately
1 parent ad3e32a commit 9f5386a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/plugins/order.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function plugin() {
99
}
1010

1111

12-
const res = path.basename(file).match(/^((\d+)-)+/);
12+
const res = path.basename(file).match(/^(?:(?:\d+)-)+/);
1313
if (res) {
1414
const data = files[file];
1515
data.order = res[0].replace(/-/g, '');
@@ -24,4 +24,4 @@ function plugin() {
2424
}
2525
}
2626

27-
module.exports = plugin;
27+
module.exports = plugin;

0 commit comments

Comments
 (0)