Fixed incorrect humanumarts links
This commit is contained in:
@@ -27,10 +27,11 @@ func getCUHARTSUrlForChar(c string) string {
|
||||
|
||||
func SParams(p string) string {
|
||||
s1 := "-"
|
||||
bestMatch := 0
|
||||
for _, x := range SING_MOU_S1 {
|
||||
if strings.HasPrefix(p, x) {
|
||||
if bestMatch < len(x) && strings.HasPrefix(p, x) {
|
||||
s1 = x
|
||||
break
|
||||
bestMatch = len(x)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,13 +44,11 @@ func SParams(p string) string {
|
||||
}
|
||||
|
||||
s2 := ""
|
||||
bestMatch := 0
|
||||
bestMatch = 0
|
||||
for _, x := range WAN_MOU_S2 {
|
||||
if strings.HasSuffix(strings.TrimSuffix(strings.TrimPrefix(p, s1), s3), x) {
|
||||
if bestMatch < len(x) {
|
||||
s2 = x
|
||||
bestMatch = len(x)
|
||||
}
|
||||
if bestMatch < len(x) && strings.HasSuffix(strings.TrimSuffix(strings.TrimPrefix(p, s1), s3), x) {
|
||||
s2 = x
|
||||
bestMatch = len(x)
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("s1=%s&s2=%s&s3=%s", s1, s2, s3)
|
||||
|
||||
Reference in New Issue
Block a user