From a83fd3b1fae5a2195aed0da6187e54a079f6d1a6 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 15 Feb 2025 12:19:24 +0000 Subject: [PATCH] Try to work around RST problem with bold after a question mark. --- src/calibre/utils/ffml_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/ffml_processor.py b/src/calibre/utils/ffml_processor.py index cd2310ae04..584d5c08e1 100644 --- a/src/calibre/utils/ffml_processor.py +++ b/src/calibre/utils/ffml_processor.py @@ -389,7 +389,7 @@ class FFMLProcessor: if tree.node_kind() == NodeKinds.BLANK_LINE: result += '\n\n' elif tree.node_kind() == NodeKinds.BOLD_TEXT: - indent_text(f'**{tree.text()}**') + indent_text(("\\ " if result.endswith("?") else "") + f'**{tree.text()}**') elif tree.node_kind() == NodeKinds.CHARACTER: result += tree.text() elif tree.node_kind() == NodeKinds.CODE_BLOCK: