v0.5.3
- Мелкие исправления увеличивающие работу конвертера
This commit is contained in:
+10
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user