From 9a3bb92374986f7512d1b837124d6a70bab7eeee Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Fri, 19 Jun 2026 09:06:52 +0800 Subject: [PATCH] docs: fix sidebar scaffold on section-less pages Body-class regex required class right after
, but pages with a title anchor emit , so toc2 toc-left was never added. Section-less pages (pci-parallel-port, mpg) lost the left margin and TOC arrows. Match attrs before class. --- docs/src/lang_switcher_postprocess.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/lang_switcher_postprocess.py b/docs/src/lang_switcher_postprocess.py index ecf4b645fcb..076280c4d4b 100644 --- a/docs/src/lang_switcher_postprocess.py +++ b/docs/src/lang_switcher_postprocess.py @@ -397,9 +397,11 @@ def _scaffold_sidebar(content, nav): """Section-less pages have no toc2 container; add the body classes and insert the sidebar div after the page