From 42640173d350b82abf290512deb9baa3f060ce9a Mon Sep 17 00:00:00 2001 From: crossdark Date: Sat, 5 Oct 2024 13:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20CrossDown/Core.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BasicSimple->Simple --- CrossDown/Core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CrossDown/Core.py b/CrossDown/Core.py index 590f96a..c6fc961 100644 --- a/CrossDown/Core.py +++ b/CrossDown/Core.py @@ -37,7 +37,7 @@ except ModuleNotFoundError: EXTRA_ABLE = False -class BasicSimple(InlineProcessor): +class Simple(InlineProcessor): """ 可通过简单的正则表达式和HTML标签实现的样式 """ @@ -114,9 +114,9 @@ class Basic(Extension): def extendMarkdown(self, md): md.registerExtension(self) # 注册扩展 - md.inlinePatterns.register(BasicSimple(r'~~(.*?)~~', tag='s'), 'strikethrough', 0) # ~~删除线~~ - md.inlinePatterns.register(BasicSimple(r'~(.*?)~', tag='u'), 'underline', 0) # ~下划线~ - md.inlinePatterns.register(BasicSimple(r'==(.*?)==', tag='mark'), 'high_light', 0) # ==高亮== + md.inlinePatterns.register(Simple(r'~~(.*?)~~', tag='s'), 'strikethrough', 0) # ~~删除线~~ + md.inlinePatterns.register(Simple(r'~(.*?)~', tag='u'), 'underline', 0) # ~下划线~ + md.inlinePatterns.register(Simple(r'==(.*?)==', tag='mark'), 'high_light', 0) # ==高亮== md.inlinePatterns.register(BasicDifficult( r'\[(.*?)]\^\((.*?)\)', outer_tag='ruby', inner_tag='rt'), 'up', 0 ) # [在文本的正上方添加一行小文本]^(主要用于标拼音)