File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -439,14 +439,16 @@ def find_notebooks(
439439 }
440440
441441 # Convert to a Path and back to a string to remove any instances of `/.`
442- pattern = str (Path (pattern . replace ( "." , r"\." ). format ( ** pattern_args ) ))
442+ pattern = str (Path (pattern ))
443443
444444 if sys .platform == 'win32' :
445- # Escape backslashes on Windows
445+ # Escape backslashes on Windows before doing any other escaping
446446 pattern = pattern .replace ('\\ ' , r'\\' )
447447
448+ pattern = pattern .replace ("." , r"\." ).format (** pattern_args )
449+
448450 for file in files :
449- match = re .match (pattern , str (file . relative_to ( self . root ) ))
451+ match = re .match (pattern , str (file ))
450452 if match :
451453 results .append ({ ** kwargs , ** match .groupdict (), "path" : file })
452454
You can’t perform that action at this time.
0 commit comments