Skip to content

Commit

Permalink
针对一些没有名字的片段的兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed May 28, 2022
1 parent fa42ebf commit 8e33126
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ func onSelectCategory() {
name = strings.ReplaceAll(namearr[nameIndexCache[splitId]].(string), "%s", dropBrackets(description))
nameIndexCache[splitId]++
}
} else {
name = strings.TrimSpace(reg.ReplaceAllString(name, ""))
}
if len(name) == 0 {
name = dropBrackets(description)
}
return translate(strings.TrimSpace(reg.ReplaceAllString(name, "")))
return translate(name)
}
if startTrigger, ok := splitsDictIdToDescriptions[j.StartTriggeringAutosplit]; ok {
startTriggerCheckBox.SetChecked(true)
Expand Down

0 comments on commit 8e33126

Please sign in to comment.