mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
minor changes in format of DIRECTORY.md (#1461)
This commit is contained in:

committed by
Christian Clauss

parent
3ea0992dc7
commit
a61b05b10c
@ -17,7 +17,7 @@ def good_filepaths(top_dir: str = ".") -> Iterator[str]:
|
||||
|
||||
|
||||
def md_prefix(i):
|
||||
return f"{i * ' '}*" if i else "##"
|
||||
return f"{i * ' '}*" if i else "\n##"
|
||||
|
||||
|
||||
def print_path(old_path: str, new_path: str) -> str:
|
||||
@ -37,7 +37,7 @@ def print_directory_md(top_dir: str = ".") -> None:
|
||||
old_path = print_path(old_path, filepath)
|
||||
indent = (filepath.count(os.sep) + 1) if filepath else 0
|
||||
url = "/".join((URL_BASE, filepath, filename)).replace(" ", "%20")
|
||||
filename = os.path.splitext(filename.replace("_", " "))[0]
|
||||
filename = os.path.splitext(filename.replace("_", " ").title())[0]
|
||||
print(f"{md_prefix(indent)} [{filename}]({url})")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user