Update json_to_md.py
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 26s

This commit is contained in:
2025-07-17 15:26:13 +02:00
parent c60d6b239d
commit 1430c229db
+6 -5
View File
@@ -17,16 +17,17 @@ def stringify(obj, indent=0):
elif isinstance(obj, (int, float, str, bool)):
return str(obj)
elif isinstance(obj, list):
return '\n'.join(f"{space} {stringify(e, indent + 1)}" for e in obj)
return '\n'.join(f"{space}- {stringify(e, indent + 1)}" for e in obj)
elif isinstance(obj, dict):
return '\n'.join(f"{space}{k}: {stringify(v, indent + 1)}" for k, v in obj.items())
elif hasattr(obj, '__str__'):
elif isinstance(obj, object) and str(obj).startswith("<object object at"):
return "<opaque object>"
else:
try:
return str(obj)
except:
return repr(obj)
else:
return repr(obj)
return "<unstringifiable>"
def normalize_nodeid(nodeid):