From 54ae263559a9953f9fa260df16f46150d45b7e63 Mon Sep 17 00:00:00 2001
From: un-pogaz <46523284+un-pogaz@users.noreply.github.com>
Date: Fri, 29 Nov 2024 13:59:59 +0100
Subject: [PATCH] add
to raw doc output
try to preserve a minimum the line return of the original format
---
src/calibre/gui2/dialogs/template_dialog.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/calibre/gui2/dialogs/template_dialog.py b/src/calibre/gui2/dialogs/template_dialog.py
index f171a50e54..5e35c1e453 100644
--- a/src/calibre/gui2/dialogs/template_dialog.py
+++ b/src/calibre/gui2/dialogs/template_dialog.py
@@ -82,7 +82,7 @@ def safe_get_doc_html(ffml, func, fname, original_doc):
error_msg = build_error_msg(str(ex))
# return raw doc
- return error_msg+'
'+doc.strip()
+ return error_msg+'
'+doc.strip().replace('\n', '
')
class DocViewer(Dialog):