diff --git a/.idea/CrossDown.iml b/.idea/CrossDown.iml index 508e51a..16f901c 100644 --- a/.idea/CrossDown.iml +++ b/.idea/CrossDown.iml @@ -10,4 +10,7 @@ + + \ No newline at end of file diff --git a/CrossDown/Core.py b/CrossDown/Core.py index 675d2fd..f257fb8 100644 --- a/CrossDown/Core.py +++ b/CrossDown/Core.py @@ -37,6 +37,8 @@ from pymdownx.tilde import DeleteSubExtension from pymdownx.magiclink import MagiclinkExtension from pymdownx.pathconverter import PathConverterExtension +import kbdextension + from .Define import Variable @@ -226,7 +228,7 @@ class AnchorExtension(Extension): :param md: 转换器 """ 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) # 添加页内链接 @@ -271,6 +273,9 @@ Extensions = { '超级链接': MagiclinkExtension(), '路径转换器': PathConverterExtension(), + # 其它 + 'KBD': kbdextension.KbdExtension(), + # 自定义 '基本风格': BasicExtension(), '锚点': AnchorExtension(), diff --git a/README.html b/README.html index 742421f..53d1d0c 100644 --- a/README.html +++ b/README.html @@ -59,11 +59,7 @@
  • 2.2 赋值
  • -
  • 3 锚点 -
  • +
  • 3 锚点
  • 4 代码块
    • 4.1 单行
      • 4.1.1 LaTex
      • @@ -178,10 +174,6 @@

        2.2 赋值

        直接在文本中使用 缩写 即可

        3 锚点

        -

        3.1 定义

        -

        锚点名

        -

        3.2 页内链接

        -

        锚点名

        4 代码块

        4.1 单行

        Here is some code: import pymdownx; pymdownx.__version__.

        @@ -197,6 +189,7 @@

        ¥y=x**3¥€-50,50|-100,100€ // 定义了y范围

        4.1.3 按键风格

        Ctrl+Alt+Del

        +

        Enter

        4.1.4 突出

        {突出内容}

        4.2 多行

        @@ -263,8 +256,7 @@ p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right) \end{align} -

        行内公式: p(x|y) = \frac{p(y|x)p(x)}{p(y)}

        -

        $Cu_{2}(OH)_{2}CO_{3}$

        +

        行内公式: p(x|y) = \frac{p(y|x)p(x)}{p(y)}

        4.2.6 HTML

        <head>
                 <!--头部-->
        @@ -547,7 +539,7 @@
             

        15 内部链接

        -

        Bracketed

        +

        Bracketed

        16 变量

        {[强调变量]}

        17 属性设置

        diff --git a/README.md b/README.md index fcab461..2467d6a 100644 --- a/README.md +++ b/README.md @@ -90,14 +90,6 @@ liuhanbo333@icloud.com 3 锚点 -3.1 定义 - -{{#锚点名}} - -3.2 页内链接 - -{{锚点名}} - 4 代码块 4.1 `单行` @@ -127,6 +119,8 @@ $\lg\left(\frac{目标生物的理智值}{稳定折磨型工具人的理智值}\ ++ctrl+alt+delete++ +[[Enter]] + 4.1.4 突出 `{突出内容}` diff --git a/data.pkl b/data.pkl index 6056175..4713934 100644 Binary files a/data.pkl and b/data.pkl differ diff --git a/requirements.txt b/requirements.txt index cefee52..ce5108a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ pygments>=2.18.0 CrossDown>=2.2.0 setuptools~=70.1.1 emoji~=2.13.2 -pymdown-extensions>=10.12 \ No newline at end of file +pymdown-extensions>=10.12 +kbdextension>=1.0.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 3c6e08f..d6a6a75 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import setuptools from CrossDown import Meta -meta = Meta(3, 2, 9) +meta = Meta(3, 3, 1) setuptools.setup( name="CrossDown",