hot-fix 0.4.3
Python application / build (push) Has been cancelled

- fix Не появляется пустая странициа перед названием таблицы
- fix Не появляется пустая страница перед альбомной ориентацией
- fix При отказе от изменений создаётся новый файл
- fix Замена "..." на «...» больше не затрагивает uml и mermaid блоки
This commit is contained in:
Igor20264
2026-09-05 10:24:13 +03:00
parent 8508d04bbc
commit febf62c257
18 changed files with 267 additions and 49 deletions
+3 -11
View File
@@ -154,23 +154,15 @@ class Table(Renderable, RequiresNumbering):
self, layout_state: LayoutState
) -> Generator[RenderedInfo, None, None]:
"""For legacy/caption only: break page and insert «Продолжение Таблицы N»."""
mode = self._continuation_mode
if mode == "legacy":
continuation_paragraph = self._make_continuation_paragraph()
continuation_paragraph.page_break_before = True
info = next(continuation_paragraph.render(None, copy(layout_state)))
layout_state.add_height(info.height)
yield info
return
# caption
page_break_info = next(PageBreak(self._parent).render(None, layout_state))
layout_state.add_height(page_break_info.height)
yield page_break_info
# Never page_break_before on «Название таблицы»: keep_with_next +
# pageBreakBefore makes a blank page that debug does not count.
continuation_paragraph = self._make_continuation_paragraph()
continuation_paragraph._docx_paragraph.paragraph_format.keep_with_next = True
continuation_paragraph._docx_paragraph.paragraph_format.page_break_before = False
info = next(continuation_paragraph.render(None, copy(layout_state)))
layout_state.add_height(info.height)
yield info