3.3.1 支持KBD
Some checks failed
Publish to PyPI on main branch update / build_and_publish (push) Has been cancelled
Some checks failed
Publish to PyPI on main branch update / build_and_publish (push) Has been cancelled
This commit is contained in:
parent
1b11504238
commit
1b22d1fc80
@ -10,4 +10,7 @@
|
|||||||
<orderEntry type="jdk" jdkName="Python 3.11 (CrossDown)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Python 3.11 (CrossDown)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="PackageRequirementsSettings">
|
||||||
|
<option name="versionSpecifier" value="大于或等于 (>=x.y.z)" />
|
||||||
|
</component>
|
||||||
</module>
|
</module>
|
@ -37,6 +37,8 @@ from pymdownx.tilde import DeleteSubExtension
|
|||||||
from pymdownx.magiclink import MagiclinkExtension
|
from pymdownx.magiclink import MagiclinkExtension
|
||||||
from pymdownx.pathconverter import PathConverterExtension
|
from pymdownx.pathconverter import PathConverterExtension
|
||||||
|
|
||||||
|
import kbdextension
|
||||||
|
|
||||||
from .Define import Variable
|
from .Define import Variable
|
||||||
|
|
||||||
|
|
||||||
@ -226,7 +228,7 @@ class AnchorExtension(Extension):
|
|||||||
:param md: 转换器
|
:param md: 转换器
|
||||||
"""
|
"""
|
||||||
md.registerExtension(self) # 注册扩展
|
md.registerExtension(self) # 注册扩展
|
||||||
md.inlinePatterns.register(Anchor(r'\{{#([^{}#]+)}}'), 'anchor', 0) # 定义锚点
|
# md.inlinePatterns.register(Anchor(r'\{{#([^{}#]+)}}'), 'anchor', 0) # 定义锚点
|
||||||
md.inlinePatterns.register(LinkLine(r'\{{([^{}#]+)}}'), 'line_link', 0) # 添加页内链接
|
md.inlinePatterns.register(LinkLine(r'\{{([^{}#]+)}}'), 'line_link', 0) # 添加页内链接
|
||||||
|
|
||||||
|
|
||||||
@ -271,6 +273,9 @@ Extensions = {
|
|||||||
'超级链接': MagiclinkExtension(),
|
'超级链接': MagiclinkExtension(),
|
||||||
'路径转换器': PathConverterExtension(),
|
'路径转换器': PathConverterExtension(),
|
||||||
|
|
||||||
|
# 其它
|
||||||
|
'KBD': kbdextension.KbdExtension(),
|
||||||
|
|
||||||
# 自定义
|
# 自定义
|
||||||
'基本风格': BasicExtension(),
|
'基本风格': BasicExtension(),
|
||||||
'锚点': AnchorExtension(),
|
'锚点': AnchorExtension(),
|
||||||
|
16
README.html
16
README.html
@ -59,11 +59,7 @@
|
|||||||
<li><a href="#2.2">2.2 赋值</a></li>
|
<li><a href="#2.2">2.2 赋值</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#3">3 锚点</a><ul>
|
<li><a href="#3">3 锚点</a></li>
|
||||||
<li><a href="#3.1">3.1 定义</a></li>
|
|
||||||
<li><a href="#3.2">3.2 页内链接</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#4">4 代码块</a><ul>
|
<li><a href="#4">4 代码块</a><ul>
|
||||||
<li><a href="#4.1">4.1 单行</a><ul>
|
<li><a href="#4.1">4.1 单行</a><ul>
|
||||||
<li><a href="#4.1.1">4.1.1 LaTex</a></li>
|
<li><a href="#4.1.1">4.1.1 LaTex</a></li>
|
||||||
@ -178,10 +174,6 @@
|
|||||||
<h2 id="2.2">2.2 赋值</h2>
|
<h2 id="2.2">2.2 赋值</h2>
|
||||||
<p>直接在文本中使用 <abbr title="长的文本">缩写</abbr> 即可</p>
|
<p>直接在文本中使用 <abbr title="长的文本">缩写</abbr> 即可</p>
|
||||||
<h1 id="3">3 锚点</h1>
|
<h1 id="3">3 锚点</h1>
|
||||||
<h2 id="3.1">3.1 定义</h2>
|
|
||||||
<p><span id="锚点名">锚点名</span></p>
|
|
||||||
<h2 id="3.2">3.2 页内链接</h2>
|
|
||||||
<p><a href="#锚点名">锚点名</a></p>
|
|
||||||
<h1 id="4">4 代码块</h1>
|
<h1 id="4">4 代码块</h1>
|
||||||
<h2 id="4.1">4.1 <code>单行</code></h2>
|
<h2 id="4.1">4.1 <code>单行</code></h2>
|
||||||
<p>Here is some code: <code class="highlight"><span class="kn">import</span> <span class="nn">pymdownx</span><span class="p">;</span> <span class="n">pymdownx</span><span class="o">.</span><span class="n">__version__</span></code>.</p>
|
<p>Here is some code: <code class="highlight"><span class="kn">import</span> <span class="nn">pymdownx</span><span class="p">;</span> <span class="n">pymdownx</span><span class="o">.</span><span class="n">__version__</span></code>.</p>
|
||||||
@ -197,6 +189,7 @@
|
|||||||
<p><code>¥y=x**3¥€-50,50|-100,100€</code> // 定义了y范围</p>
|
<p><code>¥y=x**3¥€-50,50|-100,100€</code> // 定义了y范围</p>
|
||||||
<h3 id="4.1.3">4.1.3 按键风格</h3>
|
<h3 id="4.1.3">4.1.3 按键风格</h3>
|
||||||
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-alt">Alt</kbd><span>+</span><kbd class="key-delete">Del</kbd></span></p>
|
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-alt">Alt</kbd><span>+</span><kbd class="key-delete">Del</kbd></span></p>
|
||||||
|
<p><kbd>Enter</kbd></p>
|
||||||
<h3 id="4.1.4">4.1.4 突出</h3>
|
<h3 id="4.1.4">4.1.4 突出</h3>
|
||||||
<p><code>{突出内容}</code></p>
|
<p><code>{突出内容}</code></p>
|
||||||
<h2 id="4.2">4.2 多行</h2>
|
<h2 id="4.2">4.2 多行</h2>
|
||||||
@ -263,8 +256,7 @@
|
|||||||
p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right)
|
p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right)
|
||||||
\end{align}</script>
|
\end{align}</script>
|
||||||
</div>
|
</div>
|
||||||
<p>行内公式: <span class="arithmatex"><span class="MathJax_Preview">p(x|y) = \frac{p(y|x)p(x)}{p(y)}</span><script type="math/tex">p(x|y) = \frac{p(y|x)p(x)}{p(y)}</script></span> </p>
|
<p>行内公式: <span class="arithmatex"><span class="MathJax_Preview">p(x|y) = \frac{p(y|x)p(x)}{p(y)}</span><script type="math/tex">p(x|y) = \frac{p(y|x)p(x)}{p(y)}</script></span></p>
|
||||||
<p><code>$Cu_{2}(OH)_{2}CO_{3}$</code></p>
|
|
||||||
<h3 id="4.2.6">4.2.6 HTML</h3>
|
<h3 id="4.2.6">4.2.6 HTML</h3>
|
||||||
<div class="highlight"><pre><span></span><code><span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
<div class="highlight"><pre><span></span><code><span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||||||
<span class="cm"><!--头部--></span>
|
<span class="cm"><!--头部--></span>
|
||||||
@ -547,7 +539,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
<h1 id="15">15 内部链接</h1>
|
<h1 id="15">15 内部链接</h1>
|
||||||
<p><a class="wikilink" href="/Bracketed/">Bracketed</a></p>
|
<p><kbd>Bracketed</kbd></p>
|
||||||
<h1 id="16">16 变量</h1>
|
<h1 id="16">16 变量</h1>
|
||||||
<p>{[强调变量]}</p>
|
<p>{[强调变量]}</p>
|
||||||
<h1 id="17">17 属性设置</h1>
|
<h1 id="17">17 属性设置</h1>
|
||||||
|
10
README.md
10
README.md
@ -90,14 +90,6 @@ liuhanbo333@icloud.com
|
|||||||
|
|
||||||
3 锚点
|
3 锚点
|
||||||
|
|
||||||
3.1 定义
|
|
||||||
|
|
||||||
{{#锚点名}}
|
|
||||||
|
|
||||||
3.2 页内链接
|
|
||||||
|
|
||||||
{{锚点名}}
|
|
||||||
|
|
||||||
4 代码块
|
4 代码块
|
||||||
|
|
||||||
4.1 `单行`
|
4.1 `单行`
|
||||||
@ -127,6 +119,8 @@ $\lg\left(\frac{目标生物的理智值}{稳定折磨型工具人的理智值}\
|
|||||||
|
|
||||||
++ctrl+alt+delete++
|
++ctrl+alt+delete++
|
||||||
|
|
||||||
|
[[Enter]]
|
||||||
|
|
||||||
4.1.4 突出
|
4.1.4 突出
|
||||||
|
|
||||||
`{突出内容}`
|
`{突出内容}`
|
||||||
|
@ -6,3 +6,4 @@ CrossDown>=2.2.0
|
|||||||
setuptools~=70.1.1
|
setuptools~=70.1.1
|
||||||
emoji~=2.13.2
|
emoji~=2.13.2
|
||||||
pymdown-extensions>=10.12
|
pymdown-extensions>=10.12
|
||||||
|
kbdextension>=1.0.1
|
Loading…
Reference in New Issue
Block a user