diff options
author | Astatin <[email protected]> | 2024-11-01 16:49:03 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2024-11-01 16:49:03 +0900 |
commit | dc89fa71b45eedbe1b69602b7bcfb8c7b309498f (patch) | |
tree | 2d236fd0bc6ce2e3f572a4601ccbbe3e6a24da6a | |
parent | 9a6b5ab73a025401d2dd83533a0d103fb5d13dc2 (diff) |
Fix special characters regex
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -53,7 +53,7 @@ func firstPass( parts := strings.Split(line, ":") for _, label := range parts[:len(parts)-1] { label = strings.TrimSpace(strings.ToUpper(label)) - isCharsetAllowed := regexp.MustCompile(`^[a-zA-Z0-9_-]*$`).MatchString(label) + isCharsetAllowed := regexp.MustCompile(`^[a-zA-Z0-9_.$-]*$`).MatchString(label) if !isCharsetAllowed { return nil, fmt.Errorf( "File %s, line %d:\nLabel \"%s\" contains special characters. Only alphanumeric, dashes and underscores are allowed", |