v0.5.3
Example document / build (push) Has been cancelled
Python application / build (push) Has been cancelled

- Мелкие исправления увеличивающие работу конвертера
This commit is contained in:
Igor20264
2026-09-10 10:50:15 +03:00
parent 658036f920
commit f7136bd8bd
95 changed files with 7165 additions and 8771 deletions
+10 -1
View File
@@ -294,6 +294,8 @@ def convert(req: ConvertRequest, log: LogFn | None = None) -> ConvertResult:
req.doc_type,
table_continuation=req.table_continuation,
listing_continuation=req.listing_continuation,
syntax_highlighting=req.syntax_highlighting,
strict=req.strict,
)
check_report = format_report(issues)
emit(check_report)
@@ -319,7 +321,7 @@ def convert(req: ConvertRequest, log: LogFn | None = None) -> ConvertResult:
try:
converter = Converter(
filename, output, template, req.debug,
filename, template, req.debug,
doc_type=req.doc_type,
heading_numbering=req.heading_numbering,
emdash_to_hyphen=req.emdash_to_hyphen,
@@ -404,6 +406,13 @@ def convert(req: ConvertRequest, log: LogFn | None = None) -> ConvertResult:
message=f"Ошибка конвертации: {exc}",
)
finally:
# Headless Chrome would otherwise stay alive until the next conversion.
try:
from .diagram_renderer import shutdown_diagrams
shutdown_diagrams()
except Exception:
pass
root_log.removeHandler(handler)
attached_diag.removeHandler(handler)
attached_diag.setLevel(prev_diag_level)