Skip to content

Commit c8e1714

Browse files
committed
Fix article link for new snapshot format
1 parent 1bd7ad8 commit c8e1714

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/services/Article.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ export function getArticleLink(version: string): string | undefined {
6161
if ((match = version.match(/^(\d\dw\d\d)[a-z]$/)) && match[1]) {
6262
return ARTICLE_PREFIX + 'minecraft-snapshot-' + match[1] + 'a'
6363
}
64-
if ((match = version.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/)) && match[1] && match[2]) {
64+
if ((match = version.match(/^(\d+\.\d+(?:\.\d+)?)-snapshot-(\d+)$/)) && match[1] && match[2]) {
65+
return ARTICLE_PREFIX + 'minecraft-' + match[1].replaceAll('.', '-') + '-snapshot-' + match[2]
66+
}
67+
if ((match = version.match(/^(\d+\.\d+(?:\.\d+)?)-pre(\d+)$/)) && match[1] && match[2]) {
6568
return ARTICLE_PREFIX + 'minecraft-' + match[1].replaceAll('.', '-') + '-pre-release-' + match[2]
6669
}
67-
if ((match = version.match(/^(\d+\.\d+(?:\.\d+)?)-rc([0-9]+)$/)) && match[1]) {
70+
if ((match = version.match(/^(\d+\.\d+(?:\.\d+)?)-rc(\d+)$/)) && match[1]) {
6871
return ARTICLE_PREFIX + 'minecraft-' + match[1].replaceAll('.', '-') + '-release-candidate-' + match[2]
6972
}
7073
if (version.match(/^\d+\.\d+(\.\d+)?$/)) {

0 commit comments

Comments
 (0)