forked from CrossDark/CrossDown
1.9.1 代码高亮修bug
This commit is contained in:
parent
922db49b9f
commit
79051ed280
@ -283,7 +283,7 @@ class Box(Extension):
|
||||
# 红框警告
|
||||
md.inlinePatterns.register(ID(
|
||||
r'!{3}(.+?)!{3}', tag='div', property_='style', value='display: inline-block; border: 1px solid red;'
|
||||
), 'warning_in_line', 0) # 行内
|
||||
), 'warning_in_line', 20) # 行内
|
||||
md.parser.blockprocessors.register(BoxBlock(
|
||||
md.parser, r'^ *!{3} *\n', r'\n *!{3}\s*$', 'display: inline-block; border: 1px solid red;'
|
||||
), 'warning_box', 175) # 块
|
||||
@ -291,7 +291,7 @@ class Box(Extension):
|
||||
# 黄框提醒
|
||||
md.inlinePatterns.register(ID(
|
||||
r'!-!(.+?)!-!', tag='div', property_='style', value='display: inline-block; border: 1px solid yellow;'
|
||||
), 'reminding_in_line', 1) # 行内
|
||||
), 'reminding_in_line', 21) # 行内
|
||||
md.parser.blockprocessors.register(BoxBlock(
|
||||
md.parser, r'^ *!-! *\n', r'\n *!-!\s*$', 'display: inline-block; border: 1px solid yellow;'
|
||||
), 'reminding_box', 176) # 块
|
||||
@ -299,7 +299,7 @@ class Box(Extension):
|
||||
# 绿框安心
|
||||
md.inlinePatterns.register(ID(
|
||||
r',{3}(.+?),{3}', tag='div', property_='style', value='display: inline-block; border: 1px solid green;'
|
||||
), 'reminding_in_line', 2) # 行内
|
||||
), 'reminding_in_line', 22) # 行内
|
||||
md.parser.blockprocessors.register(BoxBlock(
|
||||
md.parser, r'^ *,{3} *\n', r'\n *,{3}\s*$', 'display: inline-block; border: 1px solid green;'
|
||||
), 'reminding_box', 177) # 块
|
||||
@ -307,7 +307,7 @@ class Box(Extension):
|
||||
# 蓝框怀疑
|
||||
md.inlinePatterns.register(ID(
|
||||
r',-,(.+?),{2}', tag='div', property_='style', value='display: inline-block; border: 1px solid blue;'
|
||||
), 'reminding_in_line', 3) # 行内
|
||||
), 'reminding_in_line', 23) # 行内
|
||||
md.parser.blockprocessors.register(BoxBlock(
|
||||
md.parser, r'^ *,-, *\n', r'\n *,-,\s*$', 'display: inline-block; border: 1px solid blue;'
|
||||
), 'reminding_box', 178) # 块
|
||||
|
@ -85,6 +85,7 @@
|
||||
<li><a href="#4.2.1">4.2.1 YAML</a></li>
|
||||
<li><a href="#4.2.2">4.2.2 Python</a></li>
|
||||
<li><a href="#4.2.3">4.2.3 Mermaid</a></li>
|
||||
<li><a href="#4.2.4">4.2.4 shell</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -196,7 +197,8 @@
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="4.2.2">4.2.2 Python</h3>
|
||||
<div class="codehilite"><pre><span></span><code class="python"><span class="nb">print</span><span class="p">(</span><span class="s1">'CrossDown'</span><span class="p">)</span>
|
||||
<div class="codehilite"><pre><span></span><code class="python"><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">'CrossDown'</span><span class="p">)</span>
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="4.2.3">4.2.3 Mermaid</h3>
|
||||
@ -207,6 +209,10 @@
|
||||
C-->|结果2|E[结束2]
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="4.2.4">4.2.4 shell</h3>
|
||||
<div class="codehilite"><pre><span></span><code class="shell"><span class="nb">cd</span><span class="w"> </span>../..
|
||||
</code></pre></div>
|
||||
|
||||
<h1 id="5">5 转义</h1>
|
||||
<p>\ </p>
|
||||
<p>\a </p>
|
||||
|
@ -131,6 +131,7 @@ B:
|
||||
4.2.2 Python
|
||||
|
||||
```python
|
||||
def main():
|
||||
print('CrossDown')
|
||||
```
|
||||
|
||||
@ -144,6 +145,12 @@ graph TD
|
||||
C-->|结果2|E[结束2]
|
||||
```
|
||||
|
||||
4.2.4 shell
|
||||
|
||||
```shell
|
||||
cd ../..
|
||||
```
|
||||
|
||||
5 转义
|
||||
|
||||
\\
|
||||
|
@ -1,3 +1,4 @@
|
||||
Markdown>=3.7
|
||||
matplotlib>=3.9.2
|
||||
numpy>=2.1.1
|
||||
pygments>=2.18.0
|
Loading…
Reference in New Issue
Block a user