Skip to content

Commit c24f0b3

Browse files
committed
fix: better split file name
1 parent cf6698c commit c24f0b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
colorGreen = "\033[32m"
3939
colorYellow = "\033[33m"
4040
colorBlue = "\033[34m"
41-
VERSION = "1.0.6"
41+
VERSION = "1.0.7"
4242
)
4343

4444
func (i *arrayFlags) Set(value string) error {
@@ -299,8 +299,8 @@ func startDiscovery(myInput string) []string {
299299
} else if len(myInput) != 0 {
300300
cnHeader := "NOT-FOUND"
301301
link := ""
302-
fileName := strings.Split(myInput, "====")[0]
303-
myInput = strings.Split(myInput, "====")[1]
302+
fileName := strings.Split(myInput, "{==MY=FILE=NAME==}")[0]
303+
myInput = strings.Split(myInput, "{==MY=FILE=NAME==}")[1]
304304
reg, _ := regexp.Compile(`[cC][oO][nN][tT][eE][nN][tT]-[tT][yY][pP][eE]\s*:\s*([\w\-/]+)`)
305305

306306
if IsUrl(strings.Split(myInput, "\n")[0]) {
@@ -484,7 +484,7 @@ func readDir(directory string) []string {
484484
err := filepath.Walk(directory, func(path string, info os.FileInfo, err error) error {
485485
if !info.IsDir() {
486486
dat, _ := os.ReadFile(path)
487-
result = append(result, info.Name()+"===="+string(dat))
487+
result = append(result, info.Name()+"{==MY=FILE=NAME==}"+string(dat))
488488
}
489489
return err
490490
})

0 commit comments

Comments
 (0)