Skip to content

Commit

Permalink
fix: fixed regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Oudwins committed Jul 7, 2024
1 parent aaa3bfa commit 5dba2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/twmerge/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func IsTshirtSize(val string) bool {
}

func IsShadow(val string) bool {
pattern := regexp.MustCompile(`^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)`)
pattern := regexp.MustCompile(`^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)`)
return pattern.MatchString(val)
}

Expand Down

0 comments on commit 5dba2a8

Please sign in to comment.