diff --git a/app/gui/utils.py b/app/gui/utils.py index 1379d8c..b454349 100644 --- a/app/gui/utils.py +++ b/app/gui/utils.py @@ -67,20 +67,22 @@ def display_section_tree(_document: Document, summaries: dict): def add_hierarchy_tree(section, level=0): result_markdown = '
' - should_add_expander = summaries.get(section.id) or section.subsections + # should_add_expander = summaries.get(section.id) or section.subsections + # always add expander + should_add_expander = True if should_add_expander: # Add details tag result_markdown += "
" # Add section title and page number - result_markdown += f'{section.title}{section.starting_page}' + result_markdown += f'{section.title}{section.starting_page+1}' if should_add_expander: # Close details tag result_markdown += "" - if summary := summaries.get(section.id): - result_markdown += f"
{summary}
" + summary = summaries.get(section.id) + result_markdown += f"
Section summary: {summary or 'This section has no standalone text in its paragraphs.'}
" if section.subsections: result_markdown += "