We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ee5801 commit 1c1d03aCopy full SHA for 1c1d03a
mv-guide.py
@@ -33,13 +33,13 @@ def parse_aliases(alias_line):
33
aliases_as_clean_strings = map(
34
lambda x: x.strip(" '[]"), aliases_as_messy_strings)
35
36
- return set(map(lambda x: os.path.normpath(x).lower() + "/", aliases_as_clean_strings))
+ return set(map(lambda x: ("" if os.path.isabs(x) else "/") + os.path.normpath(x).lower() + "/", aliases_as_clean_strings))
37
38
39
def alias_style_path_for_path(content_dir, path):
40
directory = os.path.dirname(path) if os.path.isfile(path) else path
41
directory_abs_path = os.path.abspath(directory)
42
- return os.path.relpath(directory_abs_path, content_dir).lower() + "/"
+ return "/" + os.path.relpath(directory_abs_path, content_dir).lower() + "/"
43
44
45
def insert_alias(content_dir, markdown_file):
0 commit comments