Apparently curseforge allows underscores in slugs

This commit is contained in:
comp500 2019-08-20 22:10:56 +01:00 committed by GitHub
parent 0c94ea9c7c
commit 148b88474e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ var modSlugRegexes = [...]*regexp.Regexp{
regexp.MustCompile("^https?:\\/\\/minecraft\\.curseforge\\.com\\/projects\\/([^\\/]+)"),
regexp.MustCompile("^https?:\\/\\/(?:www\\.)?curseforge\\.com\\/minecraft\\/mc-mods\\/([^\\/]+)"),
// Exact slug matcher
regexp.MustCompile("^[a-z][\\da-z\\-]{0,127}$"),
regexp.MustCompile("^[a-z][\\da-z\\-_]{0,127}$"),
}
func getModIDFromString(mod string) (bool, int, error) {