SublimeHyperClick
SublimeHyperClick copied to clipboard
fix: fix alias path with up-level references resolve issue
This is another attempt to implement #84 and closes #91.
The implementation issue in the original PR is
path_parts = self.str_path.split(path.sep)
won't split on Windows, whose path.sep is \, while people use / as the separator in the import path (self.str_path). And thus the followed if path_parts[0] == alias: never be True because path_parts[0] is identical to self.str_path.
This PR treats both \ and / as path separators while spliting.