From 9bc4dc28b80d527318f55d9c7371d0cea29b7359 Mon Sep 17 00:00:00 2001 From: crossdark Date: Tue, 22 Oct 2024 19:10:46 +0800 Subject: [PATCH] =?UTF-8?q?2.2.1=20=E5=8F=98=E9=87=8F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=9C=A8=E4=BB=A3=E7=A0=81=E5=9D=97=E9=87=8C=E7=94=A8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CrossDown/Core.py | 3 ++- README.html | 5 ++++- README.md | 5 ++++- setup.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CrossDown/Core.py b/CrossDown/Core.py index 760ac86..1945187 100644 --- a/CrossDown/Core.py +++ b/CrossDown/Core.py @@ -68,6 +68,7 @@ class PreProcess(Preprocessor): def run(self, lines: List[str]) -> List[str]: new_lines = [] for line in lines: # 逐行遍历 + print(line) for value in re.findall(r'\{\[(.+?)]}', line): # 找到变量 if value in self.variable: # 变量已定义 line = re.sub(fr'\{{\[{value}]}}', self.variable[value], line) # 替换变量为值 @@ -366,7 +367,7 @@ class Pre(Extension): :param md: 转换器 """ md.registerExtension(self) # 注册扩展 - md.preprocessors.register(PreProcess(self.variable), 'pre_process', 0) + md.preprocessors.register(PreProcess(self.variable), 'pre_process', 1000) class Basic(Extension): diff --git a/README.html b/README.html index 7dc9b05..784a1f5 100644 --- a/README.html +++ b/README.html @@ -187,6 +187,9 @@ - a - b - c + 强调值: + - a + - b

4.2.2 Python

@@ -405,7 +408,7 @@

17 属性设置

可以设置文段的字体为sans-serif

可以设置文段的字体为Helvetica

-

可以设置文段的自定义字体为Courier New

+

可以设置文段的自定义字体为小赖字体

可以设置文本的黄色外框

diff --git a/README.md b/README.md index 09c0329..365f8d9 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,9 @@ B: - a - b - c +{[强调变量]}: + - a + - b ``` 4.2.2 Python @@ -372,4 +375,4 @@ Orange 可以设置文段的自定义字体{@style=font-family: SetoFont;}为小赖字体 -可以设置文本的黄色外框{@style=display: inline-block; border: 1px solid yellow;} \ No newline at end of file +可以设置文本的黄色外框{@style=display: inline-block; border: 1px solid yellow;} diff --git a/setup.py b/setup.py index 7b0fcae..4c86c48 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="CrossDown", - version="2.1.3", + version="2.2.0", author="CrossDark", author_email="liuhanbo333@icloud.com", description="CrossDark's MarkDown",