From 231edd4621c48e2b0c610e241a9e8e1a0b86b55b Mon Sep 17 00:00:00 2001
From: Mahad <56235065+Mahad-lab@users.noreply.github.com>
Date: Sun, 8 Dec 2024 12:06:02 +0000
Subject: [PATCH] fix: adjust indentation in mermaid output for better
 readability

---
 eralchemy/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eralchemy/models.py b/eralchemy/models.py
index fc90680..96c43da 100644
--- a/eralchemy/models.py
+++ b/eralchemy/models.py
@@ -201,7 +201,7 @@ class Relation(Drawable):
                 sanitize_mermaid(self.right_table),
             )
         )
-        return '{} "{}" -- "{}" {}'.format(*normalized)
+        return '  {} "{}" -- "{}" {}'.format(*normalized)
 
     def to_mermaid_er(self) -> str:
         left = Relation.cardinalities_crowfoot.get(self.left_cardinality, self.left_cardinality)
@@ -269,7 +269,7 @@ class Table(Drawable):
     def to_mermaid(self) -> str:
         columns = [c.to_mermaid() for c in self.columns]
         name = sanitize_mermaid(self.name)
-        return f"class {name}{{\n" + "\n  ".join(columns) + "\n}"
+        return f"  class {name}{{\n   " + "\n   ".join(columns) + "\n  }"
 
     def to_mermaid_er(self) -> str:
         columns = [c.to_mermaid_er() for c in self.columns]
-- 
GitLab