]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🛠️ Update `mkdocs_hooks` to handle headers with permalinks when building docs (#14025)
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 31 Aug 2025 09:11:15 +0000 (11:11 +0200)
committerGitHub <noreply@github.com>
Sun, 31 Aug 2025 09:11:15 +0000 (11:11 +0200)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
scripts/mkdocs_hooks.py

index 0bc4929a42fe3cf2ea0835d3afe3b415d37d4759..e4a49165c6479547e9af599b5fe3ee3ed4cf7ca4 100644 (file)
@@ -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: