Skip to content

Commit 494e5e9

Browse files
authored
FIX: do not prettify primary sidebar html (#965)
fix: do not prettify primary sidebar html
1 parent 5810107 commit 494e5e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/pydata_sphinx_theme/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,8 @@ def generate_toctree_html(kind, startdepth=1, show_nav_level=1, **kwargs):
395395
f"li.toctree-l{ii} > input.toctree-checkbox"
396396
):
397397
checkbox.attrs["checked"] = None
398-
out = soup.prettify()
399-
400-
elif kind == "raw":
401-
out = soup
402398

403-
return out
399+
return soup
404400

405401
@lru_cache(maxsize=None)
406402
def generate_toc_html(kind="html"):
@@ -661,6 +657,7 @@ def extract_level_recursive(ul, navs_list):
661657
navs = []
662658
for ul in soup.find_all("ul", recursive=False):
663659
extract_level_recursive(ul, navs)
660+
664661
return navs
665662

666663

0 commit comments

Comments
 (0)