1.7.6 支持内部链接

This commit is contained in:
跨越晨昏 2024-10-13 14:38:11 +08:00
parent 09f186799a
commit 38910cbe8b
3 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,4 @@
from markdown.extensions import Extension, extra, admonition, meta, sane_lists, toc from markdown.extensions import Extension, extra, admonition, meta, sane_lists, toc, wikilinks
from markdown.treeprocessors import Treeprocessor from markdown.treeprocessors import Treeprocessor
from markdown.inlinepatterns import Pattern as Pattern_ from markdown.inlinepatterns import Pattern as Pattern_
@ -12,17 +12,12 @@ import xml
import emoji import emoji
Extensions = { Extensions = {
"Extra": extra.ExtraExtension(), "Extra": extra.ExtraExtension(), # 基本扩展
# "Smart Strong": "markdown.extensions.smart_strong",
"Admonition": admonition.AdmonitionExtension(), "Admonition": admonition.AdmonitionExtension(),
# "CodeHilite": "markdown.extensions.codehilite",
# "HeaderId": "markdown.extensions.headerid",
"Meta-Data": meta.MetaExtension(), "Meta-Data": meta.MetaExtension(),
# "New Line to Break": "markdown.extensions.nl2br",
"Sane Lists": sane_lists.SaneListExtension(), "Sane Lists": sane_lists.SaneListExtension(),
# "SmartyPants": "markdown.extensions.smarty",
"Table of Contents": toc.TocExtension(), "Table of Contents": toc.TocExtension(),
# "WikiLinks": "markdown.extensions.wikilinks", "WikiLinks": wikilinks.WikiLinkExtension(),
} }
try: # 检测当前平台是否支持扩展语法 try: # 检测当前平台是否支持扩展语法

View File

@ -122,6 +122,7 @@
<li><a href="#14.4">14.4 怀疑</a></li> <li><a href="#14.4">14.4 怀疑</a></li>
</ul> </ul>
</li> </li>
<li><a href="#15">15 内部链接</a></li>
</ul> </ul>
</div> </div>
<h1 id="crossdown">CrossDown</h1> <h1 id="crossdown">CrossDown</h1>
@ -221,7 +222,7 @@
</blockquote> </blockquote>
</blockquote> </blockquote>
</blockquote> </blockquote>
<p>引文内添加klzzwxhklzzwxhklzzwxh:00390036klzzwxh:0037</p> <p>引文内添加klzzwxhklzzwxhklzzwxh:00400037klzzwxh:0038</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>
@ -325,5 +326,7 @@
<div style="display: inline-block; border: 1px solid blue;"> <div style="display: inline-block; border: 1px solid blue;">
<p>这是一条怀疑</p> <p>这是一条怀疑</p>
</div> </div>
<h1 id="15">15 内部链接</h1>
<p><a class="wikilink" href="/Bracketed/">Bracketed</a></p>
</body> </body>
</html> </html>

View File

@ -281,3 +281,7 @@ graph TD
,-, ,-,
这是一条怀疑 这是一条怀疑
,-, ,-,
15 内部链接
[[Bracketed]]