Skip to content

Commit 89e7bfe

Browse files
committed
Adding doctests for md_prefix function in build_directory_md.py
1 parent 7a0fee4 commit 89e7bfe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/build_directory_md.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ def good_file_paths(top_dir: str = ".") -> Iterator[str]:
1919

2020

2121
def md_prefix(i):
22+
"""
23+
Markdown prefix based on level for bullet points
24+
25+
>>> md_prefix(0)
26+
'\\n##'
27+
28+
>>> md_prefix(1)
29+
' *'
30+
31+
>>> md_prefix(2)
32+
' *'
33+
34+
>>> md_prefix(3)
35+
' *'
36+
"""
2237
return f"{i * ' '}*" if i else "\n##"
2338

2439

0 commit comments

Comments
 (0)