From: Sebastián Ramírez Date: Sun, 31 Aug 2025 09:11:15 +0000 (+0200) Subject: 🛠️ Update `mkdocs_hooks` to handle headers with permalinks when building docs (#14025) X-Git-Tag: 0.116.2~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=784f068abaa57aa25eac104e6d831ca12980f90e;p=thirdparty%2Ffastapi%2Ffastapi.git 🛠️ Update `mkdocs_hooks` to handle headers with permalinks when building docs (#14025) Co-authored-by: Yurii Motov --- diff --git a/scripts/mkdocs_hooks.py b/scripts/mkdocs_hooks.py index 0bc4929a42..e4a49165c6 100644 --- a/scripts/mkdocs_hooks.py +++ b/scripts/mkdocs_hooks.py @@ -110,7 +110,7 @@ def generate_renamed_section_items( # Creating a new section makes it render it collapsed by default # no idea why, so, let's just modify the existing one # new_section = Section(title=new_title, children=new_children) - item.title = new_title + item.title = new_title.split("{ #")[0] item.children = new_children new_items.append(item) else: