From 09f186799a5796aacf0331841d0d95d80be97507 Mon Sep 17 00:00:00 2001
From: crossdark
Date: Sun, 13 Oct 2024 14:32:15 +0800
Subject: [PATCH] =?UTF-8?q?1.7.5=20=E5=A4=96=E6=A1=86=E8=BF=98=E6=9C=89bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CrossDown/Core.py | 31 +++++++++++++++++++++++--------
README.html | 20 ++++++++++++++++----
README.md | 22 +++++++++++++++++++---
3 files changed, 58 insertions(+), 15 deletions(-)
diff --git a/CrossDown/Core.py b/CrossDown/Core.py
index 3de7a8e..27638e4 100644
--- a/CrossDown/Core.py
+++ b/CrossDown/Core.py
@@ -257,19 +257,34 @@ class Box(Extension):
md.registerExtension(self) # 注册扩展
# 红框警告
md.inlinePatterns.register(ID(
- r'!{3,}(.+?)!{3,}', tag='div', property_='style', value='display: inline-block; border: 1px solid red;'
- ), 'warning_in_line', 0
- ) # 行内
+ r'!{3}(.+?)!{3}', tag='div', property_='style', value='display: inline-block; border: 1px solid red;'
+ ), 'warning_in_line', 0) # 行内
md.parser.blockprocessors.register(BoxBlock(
- md.parser, r'^ *!{3,} *\n', r'\n *!{3,}\s*$', 'display: inline-block; border: 1px solid red;'
+ md.parser, r'^ *!{3} *\n', r'\n *!{3}\s*$', 'display: inline-block; border: 1px solid red;'
), 'warning_box', 175) # 块
+
# 黄框提醒
md.inlinePatterns.register(ID(
- r'!{2,}(.+?)!{2,}', tag='div', property_='style', value='display: inline-block; border: 1px solid yellow;'
- ), 'reminding_in_line', 0
- ) # 行内
+ r'!-!(.+?)!-!', tag='div', property_='style', value='display: inline-block; border: 1px solid yellow;'
+ ), 'reminding_in_line', 0) # 行内
md.parser.blockprocessors.register(BoxBlock(
- md.parser, r'^ *!{2,} *\n', r'\n *!{2,}\s*$', 'display: inline-block; border: 1px solid yellow;'
+ md.parser, r'^ *!-! *\n', r'\n *!-!\s*$', 'display: inline-block; border: 1px solid yellow;'
+ ), 'reminding_box', 175) # 块
+
+ # 绿框安心
+ md.inlinePatterns.register(ID(
+ r',{3}(.+?),{3}', tag='div', property_='style', value='display: inline-block; border: 1px solid green;'
+ ), 'reminding_in_line', 0) # 行内
+ md.parser.blockprocessors.register(BoxBlock(
+ md.parser, r'^ *,{3} *\n', r'\n *,{3}\s*$', 'display: inline-block; border: 1px solid green;'
+ ), 'reminding_box', 175) # 块
+
+ # 蓝框怀疑
+ md.inlinePatterns.register(ID(
+ r',-,(.+?),{2}', tag='div', property_='style', value='display: inline-block; border: 1px solid blue;'
+ ), 'reminding_in_line', 0) # 行内
+ md.parser.blockprocessors.register(BoxBlock(
+ md.parser, r'^ *,-, *\n', r'\n *,-,\s*$', 'display: inline-block; border: 1px solid blue;'
), 'reminding_box', 175) # 块
diff --git a/README.html b/README.html
index 19794df..466e2cd 100644
--- a/README.html
+++ b/README.html
@@ -118,6 +118,8 @@
14 外框
@@ -219,7 +221,7 @@
- 引文内添加klzzwxhklzzwxhklzzwxh:00400037klzzwxh:0038
+ 引文内添加klzzwxhklzzwxhklzzwxh:00390036klzzwxh:0037
7 提纲
7.1 提纲号
@@ -309,9 +311,19 @@
这是一条警告
14.2 提醒
- 这是一个
提醒
……
-
-
这是一条提醒
+
这是一个!-!提醒!-!……
+
!-!
+ 这是一条提醒
+ !-!
+
14.3 安心
+
这是一个,,,安心,,,……
+
,,,
+ 这是一条安心
+ ,,,
+
14.4 怀疑
+
这是一个,-,怀疑,-,……
+