From d696911ac4c69526e935d5ea37d6c2f03625c65c Mon Sep 17 00:00:00 2001 From: Logan G Date: Fri, 3 Jan 2025 23:49:17 -0700 Subject: [PATCH] Better looking slash characters --- file.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file.go b/file.go index 7cdde53..a3d502e 100644 --- a/file.go +++ b/file.go @@ -63,14 +63,14 @@ func copyFile(src, dst string) (error) { func replaceDelimiters(input string) string { replacer := strings.NewReplacer( - "/", "/", - "\\", "\", + "/", "⧸", + "\\", "⧵", ) return replacer.Replace(input) } func sanitizeFilename(filename string) string { - invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-/\[[:blank:]]]+`) + invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-⧸⧵[[:blank:]]]+`) sanitized := invalidFilenameChars.ReplaceAllString(filename, "-")