Skip to content

Commit

Permalink
Merge pull request #341 from cogentcore/regex
Browse files Browse the repository at this point in the history
code regex replace reliability enhancement
  • Loading branch information
kkoreilly authored Aug 22, 2024
2 parents baeb729 + d8c1854 commit 2603153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/findpanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (fv *FindPanel) CheckValidRegexp() bool {
return true
}
if fv.Re == nil {
return false
return fv.CompileRegexp()
}
return true
}
Expand Down Expand Up @@ -265,7 +265,7 @@ func (fv *FindPanel) CompileRegexp() bool {
var err error
fv.Re, err = regexp.Compile(fp.Find)
if err != nil {
core.MessageSnackbar(fv, fmt.Sprintf("The regular expression was invalid: %v", err))
core.ErrorSnackbar(fv, err, "The regular expression was invalid")
return false
}
return true
Expand Down

0 comments on commit 2603153

Please sign in to comment.