From cb7cdd9a2ef7e878bdd56941cb4a41da8b9fd9d0 Mon Sep 17 00:00:00 2001 From: citycide Date: Sun, 8 Nov 2020 21:35:36 -0600 Subject: [PATCH] fix: change`toPattern` to `re` to avoid deprecation warnings --- src/glob.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glob.nim b/src/glob.nim index 20bd5ca..0b99cb6 100644 --- a/src/glob.nim +++ b/src/glob.nim @@ -342,7 +342,7 @@ proc expandGlob (pattern, root: string, ignoreCase: bool): string = func globToRegex* (pattern: string, isDos = isDosDefault, ignoreCase = isDosDefault): Regex = ## Converts a string glob pattern to a regex pattern. - globToRegexString(pattern, isDos, ignoreCase).toPattern + globToRegexString(pattern, isDos, ignoreCase).re func splitPattern* (pattern: string): PatternStems = ## 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 result = Glob( pattern: pattern, regexStr: rgx, - regex: rgx.toPattern, + regex: rgx.re, base: base, magic: magic )