From 665221c4cdc0afb5aadb6c877ffa0e488fc6b8fc Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Mon, 21 Jul 2025 19:32:03 +0100 Subject: [PATCH] Fix escape sequence problem --- 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 15cd814bfe..892c09a8bd 100644 --- a/src/calibre/utils/ffml_processor.py +++ b/src/calibre/utils/ffml_processor.py @@ -393,7 +393,7 @@ class FFMLProcessor: t = t + ' ' result += f'``{t}``' elif tree.node_kind() == NodeKinds.CODE_BLOCK: - result += "\n[CODE]\n" + tree.text().replace('[/CODE]', '[\/CODE]') + "[/CODE]\n" + result += "\n[CODE]\n" + tree.text().replace('[/CODE]', r'[\/CODE]') + "[/CODE]\n" elif tree.node_kind() == NodeKinds.END_SUMMARY: result += '[/]' elif tree.node_kind() == NodeKinds.ERROR_TEXT: