recal
This commit is contained in:
@@ -113,7 +113,7 @@ class Bellande_Format:
|
||||
for key, value in data.items():
|
||||
if isinstance(value, (dict, list)):
|
||||
lines.append(f"{' ' * indent}{key}:")
|
||||
lines.append(self.to_bellande_string(value, indent + 4))
|
||||
lines.append(self.to_bellande_string(value, indent + 2))
|
||||
else:
|
||||
lines.append(f"{' ' * indent}{key}: {self.format_value(value)}")
|
||||
return '\n'.join(lines)
|
||||
@@ -121,8 +121,9 @@ class Bellande_Format:
|
||||
lines = []
|
||||
for item in data:
|
||||
if isinstance(item, dict):
|
||||
lines.append(f"{' ' * indent}-")
|
||||
lines.append(self.to_bellande_string(item, indent + 4))
|
||||
dict_lines = self.to_bellande_string(item, indent + 2).split('\n')
|
||||
lines.append(f"{' ' * indent}- {dict_lines[0]}")
|
||||
lines.extend(dict_lines[1:])
|
||||
else:
|
||||
lines.append(f"{' ' * indent}- {self.format_value(item)}")
|
||||
return '\n'.join(lines)
|
||||
|
Reference in New Issue
Block a user