diff --git a/crazy_functions/KDOCS_轻文档分析.py b/crazy_functions/KDOCS_轻文档分析.py new file mode 100644 index 0000000..e186214 --- /dev/null +++ b/crazy_functions/KDOCS_轻文档分析.py @@ -0,0 +1,5 @@ +#! .\venv\ +# encoding: utf-8 +# @Time : 2023/6/15 +# @Author : Spike +# @Descr : \ No newline at end of file diff --git a/crazy_functions/crazy_box.py b/crazy_functions/crazy_box.py new file mode 100644 index 0000000..d01891e --- /dev/null +++ b/crazy_functions/crazy_box.py @@ -0,0 +1,5 @@ +#! .\venv\ +# encoding: utf-8 +# @Time : 2023/6/14 +# @Author : Spike +# @Descr : \ No newline at end of file diff --git a/docs/assets/custom.css b/docs/assets/custom.css index f942c6a..6e53450 100644 --- a/docs/assets/custom.css +++ b/docs/assets/custom.css @@ -8,6 +8,7 @@ --message-bot-background-color-light: #FFFFFF; --message-bot-background-color-dark: #2C2C2C; } + #debug_mes { position: absolute; bottom: 0; @@ -136,6 +137,10 @@ footer { transition: height 0.3s ease; } +span.svelte-1gfkn6j { + background: unset !important; +} + .wrap.svelte-18telvq.svelte-18telvq { padding: var(--block-padding) !important; height: 100% !important; diff --git a/theme.py b/theme.py index 7f42811..30ef8d5 100644 --- a/theme.py +++ b/theme.py @@ -135,6 +135,9 @@ def adjust_theme(): return set_theme +with open("docs/assets/custom.css", "r", encoding="utf-8") as f: + customCSS = f.read() +custom_css = customCSS advanced_css = """ #debug_mes { position: absolute; diff --git a/toolbox.py b/toolbox.py index 98a280e..82c4cf0 100644 --- a/toolbox.py +++ b/toolbox.py @@ -259,19 +259,36 @@ def report_execption(chatbot, history, a, b): def text_divide_paragraph(input_str): - """ - 将文本按照段落分隔符分割开,生成带有段落标签的HTML代码。 - """ if input_str: - code_blocks = re.findall('```.*?```', input_str, re.DOTALL) - for block in code_blocks: - input_str = input_str.replace(block, f'{{{{{{{{{{{code_blocks.index(block)}}}}}}}}}}}') - # 将除了三个反引号之间的文本块以外的 "\n" 替换为 "\n\n" + # 提取所有的代码块 + code_blocks = re.findall(r'```[\s\S]*?```', input_str) - input_str = re.sub(r'(?!```)(?