Skip to content

Commit e7a3d3b

Browse files
committed
actually this is a better interpretation of version numbers
1 parent ac858d2 commit e7a3d3b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/routes/ModelTable.svelte

+2-7
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,10 @@
120120
const [, a, b] = name.match(/^(.+)-(\d{3})$/);
121121
pt1 = a;
122122
pt2 = `v${+b}`;
123-
}
124-
if (/-v[0-9.]+$/.test(pt1)) {
123+
} else if (/^.+[0-9].+-v[0-9.]+$/.test(pt1)) {
125124
const [, a, b] = pt1.match(/^(.+)-v([0-9.]+)$/);
126125
pt1 = a;
127-
if (pt2) {
128-
pt2 = `v${+b} ${pt2}`;
129-
} else {
130-
pt2 = `v${+b}`;
131-
}
126+
pt2 = `v${+b}`;
132127
}
133128
return [pt1, pt2];
134129
}

0 commit comments

Comments
 (0)