Skip to content

Commit

Permalink
Merge pull request #25 from rinx/rinx/fix-searching-paths
Browse files Browse the repository at this point in the history
Fix searching paths
  • Loading branch information
hkupty committed Oct 8, 2018
2 parents ac0af82 + 22bf312 commit 041cd8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rplugin/python3/acid/pure/__init__.py
Expand Up @@ -12,9 +12,10 @@ def path_to_ns(path, stop_paths=None):
raw_path_list = None

for stop_path in reversed(stop_paths):
m = re.search(stop_path, path)
m = re.search(stop_path[::-1], path[::-1])
if m:
raw_path_list = path[m.start():].replace("_", "-").split('/')[stop_path.count('/') + 1:]
startpos = len(path) - m.start()
raw_path_list = path[startpos:].replace("_", "-").split('/')[stop_path.count('/') + 1:]
raw_path_list[-1] = raw_path_list[-1].split('.')[0]
break

Expand Down

0 comments on commit 041cd8b

Please sign in to comment.