Skip to content

Commit

Permalink
fix: correct profile generation issue
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Jose Leiva Palomo <alejandro.leiva.palomo@ibm.com>
  • Loading branch information
AleJo2995 committed Sep 13, 2023
1 parent f74fd85 commit 1848902
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion trestle/core/control_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,17 @@ def get_part(part: common.Part, item_type: str, skip_id: Optional[str]) -> List[
# top level prose has already been written out, if present
# use presence of . in id to tell if this is top level prose
if part.id != skip_id:
items.append(f'{wrapped_label}{pad}{prose}')
if '\n*' in prose:
# it is multiline prose
sub_items = []
multi_prose = prose.split('\n*')
items.append(f'{wrapped_label}{pad}{multi_prose[0]}')
multi_prose.remove(multi_prose[0])
for prose in multi_prose:
sub_items.append(f'{prose}')
items.append(sub_items)
else:
items.append(f'{wrapped_label}{pad}{prose}')
if part.parts:
sub_list = []
for prt in part.parts:
Expand Down

0 comments on commit 1848902

Please sign in to comment.