sort functions alphabetically also in raw

This commit is contained in:
Marco Lents 2025-11-15 15:38:56 +01:00
parent be2371e0f5
commit d47627643f

View file

@ -267,7 +267,7 @@ def get_functions(elem):
for child in elem.children: for child in elem.children:
if child.name == "h3": if child.name == "h3":
if current_body != []: if current_body != []:
out.append((current_heading, current_body)) out.append((current_heading, sorted(current_body)))
current_heading = child.text.strip() current_heading = child.text.strip()
current_body = [] current_body = []
continue continue
@ -278,7 +278,7 @@ def get_functions(elem):
for grandchild in child.children for grandchild in child.children
if grandchild.text.strip() != "" if grandchild.text.strip() != ""
) )
out.append((current_heading, current_body)) out.append((current_heading, sorted(current_body)))
return out return out