Skip to content

Commit d602527

Browse files
authored
Add newline to graph's node labels
Fixes pytransitions#582
1 parent 3836dc4 commit d602527

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transitions/extensions/diagrams_base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def _convert_state_attributes(self, state):
7474
label += r"\l- exit:\l + " + r"\l + ".join(state["on_exit"])
7575
if "timeout" in state:
7676
label += r'\l- timeout(' + state['timeout'] + 's) -> (' + ', '.join(state['on_timeout']) + ')'
77-
return label
77+
# end each label with a left-aligned newline
78+
return label + r"\l"
7879

7980
def _get_state_names(self, state):
8081
if isinstance(state, (list, tuple, set)):

0 commit comments

Comments
 (0)