From c18a235d3388ecf09d96272722b4ef8b60b70bfc Mon Sep 17 00:00:00 2001 From: binary-husky Date: Wed, 18 Oct 2023 18:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83HTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/pdf_fns/report_gen_html.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crazy_functions/pdf_fns/report_gen_html.py b/crazy_functions/pdf_fns/report_gen_html.py index e63c164..2182921 100644 --- a/crazy_functions/pdf_fns/report_gen_html.py +++ b/crazy_functions/pdf_fns/report_gen_html.py @@ -23,8 +23,10 @@ class construct_html(): }, """ def std(str): - str = str.replace(r'`',r'\`') - str += ' ' + str = str.replace(r'`',r'`') + if str.endswith("\\"): str += ' ' + if str.endswith("}"): str += ' ' + if str.endswith("$"): str += ' ' return str template_ = template