Skip to content

Commit

Permalink
Do not overwrite the parser's regex if the new value is an empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
  • Loading branch information
rdimitrov committed Jun 3, 2024
1 parent 968d18d commit 7522446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/replacer/replacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *Replacer) WithGitHubClient(client interfaces.REST) *Replacer {

// WithUserRegex sets a user-provided regex for the parser
func (r *Replacer) WithUserRegex(regex string) *Replacer {
if r.parser != nil {
if r.parser != nil && regex != "" {
r.parser.SetRegex(regex)
}
return r
Expand Down

0 comments on commit 7522446

Please sign in to comment.