Skip to content

Commit

Permalink
Format regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgo committed Jul 19, 2019
1 parent c5425a4 commit 68161ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/searches/regex-search.ts
Expand Up @@ -31,7 +31,7 @@ export class RegexSearch {
this.resolve = resolve
this.reject = reject
this.text = text
this.searchRegexp = regex
this.searchRegexp = new RegExp(regex)
if (timeoutDuration != null) {
this.timeoutDuration = timeoutDuration
setTimeout(this.onTimeout.bind(this), timeoutDuration)
Expand All @@ -50,7 +50,7 @@ export class RegexSearch {
private onTimeout() {
this.reject(
new Error(
`Regex /${this.searchRegexp}/ not found within ${
`Regex ${this.searchRegexp} not found within ${
this.timeoutDuration
} ms. The captured text so far is:\n${this.text.toString()}`
)
Expand Down

0 comments on commit 68161ac

Please sign in to comment.