- fix Не появляется пустая странициа перед названием таблицы - fix Не появляется пустая страница перед альбомной ориентацией - fix При отказе от изменений создаётся новый файл - fix Замена "..." на «...» больше не затрагивает uml и mermaid блоки
This commit is contained in:
+15
-4
@@ -21,7 +21,7 @@ from .diagram_schemes import (
|
||||
)
|
||||
from .dnd import enable_file_drop, first_markdown
|
||||
from .help_content import SCHEMES_HELP, USAGE_HELP, load_prompt_catalog
|
||||
from .pipeline import ConvertRequest, convert, default_output_path
|
||||
from .pipeline import ConvertRequest, convert, default_output_path, timestamped_output_path
|
||||
from .profiles import (
|
||||
DEFAULT_HEADING_NUMBERING,
|
||||
DEFAULT_TABLE_CONTINUATION,
|
||||
@@ -1200,9 +1200,19 @@ class Md2GostApp:
|
||||
if not req.filename:
|
||||
messagebox.showinfo("md2gost", "Сначала перетащите или выберите markdown-файл.")
|
||||
return
|
||||
if not req.check_only and req.output and os.path.isfile(req.output):
|
||||
if not messagebox.askyesno("md2gost", f"Файл уже есть:\n{req.output}\n\nПерезаписать?"):
|
||||
return
|
||||
if not req.check_only:
|
||||
target = (req.output or "").strip() or (
|
||||
default_output_path(req.filename) if req.filename else ""
|
||||
)
|
||||
if target and os.path.isfile(target):
|
||||
if not messagebox.askyesno(
|
||||
"md2gost", f"Файл уже есть:\n{target}\n\nПерезаписать?"
|
||||
):
|
||||
target = timestamped_output_path(target)
|
||||
self._append_log(f"Не перезаписываем, пишем в {target}")
|
||||
req.output = target
|
||||
self.output_var.set(target)
|
||||
self._auto_output = False
|
||||
self._busy = True
|
||||
self.convert_btn.configure(state=tk.DISABLED, bg=NAVY_DIM)
|
||||
self.progress.start(12)
|
||||
@@ -1225,6 +1235,7 @@ class Md2GostApp:
|
||||
self._append_log("Дебаг сброшен после этой сборки.")
|
||||
if result.ok:
|
||||
if result.output_path:
|
||||
self.output_var.set(result.output_path)
|
||||
self._append_log("Готово.")
|
||||
elif result.check_report:
|
||||
self._append_log("Проверка завершена.")
|
||||
|
||||
Reference in New Issue
Block a user