Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hinak0 committed Dec 22, 2024
1 parent 09a9750 commit 633546d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generator/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func getSingleSubscription(client *http.Client, sub config.Subscription) ([]prot
if sub.Name != "" {
for i := range proxies {
// [name]proxyname
proxies[i].Name = fmt.Sprintf("[%s]%s", sub.Name, proxies[i].Name)
proxies[i].Name = fmt.Sprintf("[%s] %s", sub.Name, proxies[i].Name)
}
}

Expand Down
4 changes: 3 additions & 1 deletion generator/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package generator

import (
"regexp"
"strings"

"github.com/hinak0/ClashConfigConverter/proto"
)
Expand All @@ -10,7 +11,8 @@ import (
func RemoveEmojis(input string) string {
// 使用正则表达式匹配大部分 Emoji 字符
re := regexp.MustCompile(`[\x{1F600}-\x{1F64F}]|[\x{1F300}-\x{1F5FF}]|[\x{1F680}-\x{1F6FF}]|[\x{2600}-\x{26FF}]|[\x{2700}-\x{27BF}]|[\x{1F900}-\x{1F9FF}]|[\x{1FA70}-\x{1FAFF}]|[\x{1F1E6}-\x{1F1FF}]`)
return re.ReplaceAllString(input, "")
tmp := re.ReplaceAllString(input, "")
return strings.TrimSpace(tmp)
}

func getAllProxyName(proxies []proto.Proxy) (proxiesNameList []string) {
Expand Down

0 comments on commit 633546d

Please sign in to comment.