Skip to content

Commit cb7cdd9

Browse files
committed
fix: changetoPattern to re to avoid deprecation warnings
1 parent 37bcb4a commit cb7cdd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/glob.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ proc expandGlob (pattern, root: string, ignoreCase: bool): string =
342342

343343
func globToRegex* (pattern: string, isDos = isDosDefault, ignoreCase = isDosDefault): Regex =
344344
## Converts a string glob pattern to a regex pattern.
345-
globToRegexString(pattern, isDos, ignoreCase).toPattern
345+
globToRegexString(pattern, isDos, ignoreCase).re
346346

347347
func splitPattern* (pattern: string): PatternStems =
348348
## Splits the given pattern into two parts: the ``base`` which is the part
@@ -377,7 +377,7 @@ func glob* (pattern: string, isDos = isDosDefault, ignoreCase = isDosDefault): G
377377
result = Glob(
378378
pattern: pattern,
379379
regexStr: rgx,
380-
regex: rgx.toPattern,
380+
regex: rgx.re,
381381
base: base,
382382
magic: magic
383383
)

0 commit comments

Comments
 (0)