next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.32k stars 416 forks source link

使用 label 标签外挂在开头时,会导致无法换行 #707

Closed immyw closed 2 months ago

immyw commented 7 months ago

Issue Checklist

Expected behavior

换行

Actual behavior

无法换行

Steps to reproduce the behavior

{% label @ipsum %} Lorem {% label primary@dolor sit %} amet, consectetur {% label success@adipiscing elit, %} sed {% label info@do eiusmod %} tempor incididunt ut labore et dolore magna aliqua.

{% label @ipsum %} Lorem {% label primary@dolor sit %} amet, consectetur {% label success@adipiscing elit, %} sed {% label info@do eiusmod %} tempor incididunt ut labore et dolore magna aliqua.

生成的结果

image

发现如果在开头使用 label 标签外挂, 生成的 文字不是 p 标签包住。这样就导致两段文字都是 开头使用 label 标签外挂,没有换行

image

Node.js and NPM Information

v20.8.0
9.8.0

Package dependencies Information

+-- hexo-generator-archive@2.0.0
+-- hexo-generator-category@2.0.0
+-- hexo-generator-index@3.0.0
+-- hexo-generator-tag@2.0.0
+-- hexo-renderer-ejs@2.0.0
+-- hexo-renderer-marked@6.1.1
+-- hexo-renderer-stylus@3.0.0
+-- hexo-server@3.0.0
+-- hexo-theme-landscape@1.0.0
+-- hexo-theme-next@8.18.1
`-- hexo@6.3.0

Hexo Configuration

初始版本

NexT Configuration

初始版本

Other Information

No response

welcome[bot] commented 7 months ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 7 months ago

这个是 Hexo 原理限制,主题无法解决

stevenjoezhang commented 2 months ago

这个 Issue 我先关了,可以加入 Hexo 那边的讨论: https://github.com/hexojs/hexo/issues/5309