From b95678b18f70a353569d5163648c51712952d026 Mon Sep 17 00:00:00 2001 From: Ionut Staicu Date: Tue, 2 Jan 2018 06:27:08 +0200 Subject: [PATCH] Fixes wrong paths For some reasons, that regex broke the SCSS includes. It was marked as a regression fix on 1a17a9b7ebb1e3b0084b8762a2998b85765faa26 but... i'm not sure what it fixes there :) The problem I suspect is that it is augmenting the path like this: ``` [ "'pages/article'", "'pages/article'pages/article", <<<<<<<<<<<<<<<< ...] ``` And later on the parser has trouble with that. PS: while the opening existing files didn't worked, the creation of new files did. --- open_include.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/open_include.py b/open_include.py index 07a0e9b..7a0394b 100644 --- a/open_include.py +++ b/open_include.py @@ -319,12 +319,11 @@ def resolve_path(self, window, view, paths, skip_folders = False): pass user_home_path = expanduser("~") - - for path in paths.split('\n'): + + paths = re.sub('"|\'|<|>|\(|\)|\{|\}|\[|\]|;', '', paths) + + for path in paths.split('\n'): if not path.startswith('http'): - - paths += re.sub('"|\'|<|>|\(|\)|\{|\}|\[|\]|;', '', path) - # remove quotes paths += '\n' + re.sub(';', '', path) # remove :row:col