1.9.9 修bug

This commit is contained in:
跨越晨昏 2024-10-17 18:58:04 +08:00
parent 34f7d0d85e
commit 02c2691dc5
2 changed files with 8 additions and 8 deletions

View File

@ -267,17 +267,17 @@ class Basic(Extension): # TODO InlineProcessor 不能渲染一行中两个以
def extendMarkdown(self, md): def extendMarkdown(self, md):
md.registerExtension(self) # 注册扩展 md.registerExtension(self) # 注册扩展
md.inlinePatterns.register(Simple(r'~~(.*?)~~', tag='s'), 'strikethrough', 1) # ~~删除线~~ md.inlinePatterns.register(Simple(r'~~(.*?)~~', tag='s'), 'strikethrough', 176) # ~~删除线~~
md.inlinePatterns.register(Simple(r'~(.*?)~', tag='u'), 'underline', 2) # ~下划线~ md.inlinePatterns.register(Simple(r'~(.*?)~', tag='u'), 'underline', 177) # ~下划线~
md.inlinePatterns.register(Simple(r'==(.*?)==', tag='mark'), 'high_light', 3) # ==高亮== md.inlinePatterns.register(Simple(r'==(.*?)==', tag='mark'), 'high_light', 178) # ==高亮==
md.inlinePatterns.register(Nest( md.inlinePatterns.register(Nest(
r'\[(.*?)]\^\((.*?)\)', outer_tag='ruby', inner_tag='rt'), 'up', 4 r'\[(.*?)]\^\((.*?)\)', outer_tag='ruby', inner_tag='rt'), 'up', 179
) # [在文本的正上方添加一行小文本]^(主要用于标拼音) ) # [在文本的正上方添加一行小文本]^(主要用于标拼音)
md.inlinePatterns.register(ID( md.inlinePatterns.register(ID(
r'\[(.*?)]-\((.*?)\)', tag='span', property_='title'), 'hide', 5 r'\[(.*?)]-\((.*?)\)', tag='span', property_='title'), 'hide', 180
) # [在指定的文本里面隐藏一段文本]-(只有鼠标放在上面才会显示隐藏文本) ) # [在指定的文本里面隐藏一段文本]-(只有鼠标放在上面才会显示隐藏文本)
md.inlinePatterns.register(Emoji(r':(.+?):'), 'emoji', 6) # 将emoji短代码转换为emoji字符 md.inlinePatterns.register(Emoji(r':(.+?):'), 'emoji', 181) # 将emoji短代码转换为emoji字符
md.parser.blockprocessors.register(Syllabus(md.parser), 'syllabus', 11) # 渲染提纲 md.parser.blockprocessors.register(Syllabus(md.parser), 'syllabus', 182) # 渲染提纲
class Box(Extension): class Box(Extension):

View File

@ -252,7 +252,7 @@
</blockquote> </blockquote>
</blockquote> </blockquote>
</blockquote> </blockquote>
<p>引文内添加klzzwxh:0039klzzwxh:0040<u>下划线</u><u></u>删除线<u></u><mark>高亮</mark></p> <p>引文内添加<em>斜体</em><strong>粗体</strong><u>下划线</u><u></u>删除线<u></u><mark>高亮</mark></p>
</blockquote> </blockquote>
<h1 id="7">7 提纲</h1> <h1 id="7">7 提纲</h1>
<h2 id="7.1">7.1 提纲号</h2> <h2 id="7.1">7.1 提纲号</h2>