Skip to content

Commit 8416086

Browse files
committed
fix: correct heading level
1 parent f130951 commit 8416086

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tasks/docs/generate/xml-to-markdown.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def process_function(memberdef):
278278
# For SQL functions, the return type might be in the argsstring element after "RETURNS"
279279
argsstring = memberdef.find('argsstring')
280280
return_type_text = ''
281-
281+
282282
if argsstring is not None and argsstring.text:
283283
# Look for RETURNS keyword in argsstring
284284
import re
@@ -291,7 +291,7 @@ def process_function(memberdef):
291291
pass
292292
# Debug print
293293
#print(f"DEBUG: Extracted from argsstring: {return_type_text}")
294-
294+
295295
# Fallback to type element if not found in argsstring
296296
if not return_type_text:
297297
return_type = memberdef.find('type')
@@ -312,14 +312,14 @@ def process_function(memberdef):
312312
return_type_text = re.sub(r'`\s+`', '.', return_type_text)
313313
# Clean up and ensure proper backtick formatting
314314
return_type_text = return_type_text.strip()
315-
315+
316316
# If already has backticks, clean up doubles
317317
if '`' in return_type_text:
318318
# Clean up double backticks: ``something`` -> `something`
319319
return_type_text = re.sub(r'``+', '`', return_type_text)
320320
# Remove backticks for now to re-add them properly
321321
return_type_text = return_type_text.replace('`', '')
322-
322+
323323
# Wrap in single backticks if it looks like a type name
324324
if return_type_text and re.match(r'^[a-zA-Z_][a-zA-Z0-9_.]*(\[\])?$', return_type_text):
325325
return_type_text = f'`{return_type_text}`'
@@ -480,7 +480,7 @@ def convert_variants_to_links(variants_text, all_functions):
480480
# Keep original text if function not found (likely missing from Doxygen output)
481481
# But strip schema prefix to match title format
482482
display_sig = f"{func_name}({params_str})" if params_str else f"{func_name}()"
483-
lines.append(f"- `{display_sig}` (not documented)")
483+
lines.append(f"- `{display_sig}`")
484484
else:
485485
# Keep original if pattern doesn't match
486486
lines.append(f"- {line}")
@@ -507,7 +507,7 @@ def generate_markdown(func, all_functions=None, type_map=None):
507507

508508
# Parameters
509509
if func['params']:
510-
lines.append("### Parameters")
510+
lines.append("#### Parameters")
511511
lines.append("")
512512
lines.append("| Name | Type | Description |")
513513
lines.append("|------|------|-------------|")
@@ -527,7 +527,7 @@ def generate_markdown(func, all_functions=None, type_map=None):
527527

528528
# Return value
529529
if func['return_desc']:
530-
lines.append("### Returns")
530+
lines.append("#### Returns")
531531
lines.append("")
532532
if func['return_type']:
533533
# Link return type if type_map is available
@@ -546,29 +546,29 @@ def generate_markdown(func, all_functions=None, type_map=None):
546546

547547
# Notes
548548
if func.get('notes'):
549-
lines.append("### Note")
549+
lines.append("#### Note")
550550
lines.append("")
551551
lines.append(func['notes'])
552552
lines.append("")
553553

554554
# Exceptions
555555
if func.get('exceptions'):
556-
lines.append("### Exceptions")
556+
lines.append("#### Exceptions")
557557
lines.append("")
558558
for exc in func['exceptions']:
559559
lines.append(f"- {exc}")
560560
lines.append("")
561561

562562
# Warnings
563563
if func.get('warnings'):
564-
lines.append("### ⚠️ Warning")
564+
lines.append("#### ⚠️ Warning")
565565
lines.append("")
566566
lines.append(func['warnings'])
567567
lines.append("")
568568

569569
# Variants - convert references to links
570570
if func.get('see_also'):
571-
lines.append("### Variants")
571+
lines.append("#### Variants")
572572
lines.append("")
573573
if all_functions:
574574
lines.append(convert_variants_to_links(func['see_also'], all_functions))

0 commit comments

Comments
 (0)