Skip to content

Commit 0d8db63

Browse files
committed
Improve appended toctrees
Ensure that the appended toctree for childrens .md are separated from the parent .md text Signed-off-by: David Morilla Cabello <[email protected]>
1 parent a574980 commit 0d8db63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build_multiversion.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def handle_file_url_rename(file_path, file_url):
143143
child_md.append(f"{child['title']} <{file_url}>")
144144

145145
with open(version_tmp_dir / new_file_path, "a") as ind_f:
146-
ind_f.write("```")
146+
# Include {toctree} for children below the .md text
147+
ind_f.write("\n```")
147148
ind_f.write("\n".join(toc_directives) + "\n")
148149
ind_f.writelines("\n".join(child_md) + "\n")
149150
ind_f.write("```\n")

0 commit comments

Comments
 (0)