fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.52k stars 273 forks source link

同样的有序列表,行距不一样 #340

Closed TracyWang-0 closed 2 years ago

TracyWang-0 commented 2 years ago

您好,我发现我这个博客的行距不一样。 都是一样的有序列表,只有大标题是伍的时候行距更宽,其他的几个大标题下面的行距都一样的,请问怎么修改啊?

image
LolipopJ commented 2 years ago

有序列表之间不要加空格即可。

例如内容如下:

## Header 1

1. 一句话。
2. 两句话。
3. 另外的第三句话。

## Header 2

1. 一句话。

2. 间隔大的两句话。

3. 另外的第三句话。

渲染的结果为:

image


原因:加了空格以后,解析器会将有序列表的内容放在 <p> 里。不加空格的话则直接渲染。

image

TracyWang-0 commented 2 years ago

您好: 非常感谢您的回复!! 如下图所示,我的.md文件是这样子的,间距宽的列表中间没有多的空格,在本地typora上显示效果如下。

王越越

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2022年05月14日 17:33 | | 收件人 | @.> | | 抄送人 | @.> , @.> | | 主题 | Re: [fi3ework/hexo-theme-archer] 同样的有序列表,行距不一样 (Issue #340) |

有序列表之间不要加空格即可。

例如内容如下:

Header 11. 一句话。

  1. 两句话。

  2. 另外的第三句话。

Header 21. 一句话。

  1. 间隔大的两句话。

  2. 另外的第三句话。

渲染的结果为:

原因:加了空格以后,解析器会将有序列表的内容放在

里。不加空格的话则直接渲染。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

LolipopJ commented 2 years ago

emm,这里并无法看到你上传的图像。

经测试,只要连续的列表有一个中间包括了空行,整个列表都会插入 <p> 标签:

## Header 1

1. Line 1
2. Line 2
3. Line 3

1. Line 5

渲染结果如下:

image

这是 Hexo 解析器(默认为 hexo-renderer-marked)的行为,typora 可能并没有采用这样的解析逻辑。

TracyWang-0 commented 2 years ago

非常感谢您的帮助! 我发现最后多了一个空格,删除以后间距就一致啦~ 太棒了!! ღ( ´・ᴗ・` )比心

王越越

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2022年05月14日 17:48 | | 收件人 | @.> | | 抄送人 | @.> , @.> | | 主题 | Re: [fi3ework/hexo-theme-archer] 同样的有序列表,行距不一样 (Issue #340) |

emm,这里并无法看到你上传的图像。

经测试,只要连续的列表有一个中间包括了空行,整个列表都会插入

标签:

Header 11. Line 12. Line 23. Line 31. Line 5

渲染结果如下:

这是 Hexo 解析器(默认为 hexo-renderer-marked)的行为,typora 可能并没有采用这样的解析逻辑。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>