-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Check List
- I have already read Docs page & Troubleshooting page.
- I have already searched existing issues and they are not help to me.
- I examined error or warning messages and it's difficult to solve.
- I am using the latest version of Hexo. (run
hexo versionto check) - My Node.js is matched the required version.
Expected behavior
- 在常见的分栏Tab标签插件和Timeline时间线标签插件中,往往会使用
<!-- tab [tabName] --><!-- endtab --><!-- timeline 4月28日 --><!-- endtimeline -->等注释进行内容划分。 - 在代码块以及行内代码中包含
<!-- -->文本时,应该按普通文本的样式显示出来,输出示例:<code><!-- 注释内容 --></code>。
Actual behavior
在更新8.1版本后,发现包含注释内容的标签插件和代码块出现问题。经排查发现是 #5616 的合并增加了注释转换然后再渲染内容导致的。
目前,以上两个场景生成的情况如下:
- 分栏Tab标签插件和Timeline时间线标签插件都无法显示内容,被注释包裹的部分完全丢失。
- 代码块和行内代码中的注释文本无法显示:
- 代码块:注释文本的位置只显示空行,在页面或者控制台都没有文本内容。
- 行内代码:在控制台发现该内容变成了真正的注释,仅在控制台可见。
How to reproduce?
- 寻找任意一个支持包含注释内容标签插件的主题进行测试,比如:
{% timeline title[,style] %}
Any Content
{% endtimeline %}
- 在代码块里测试注释内容能否显示
{% timeline title[,style] %}
<!-- timeline title -->
Any Content
<!-- endtimeline -->
{% endtimeline %}
- 在行内代码中输入注释内容测试文本能否显示
<!-- tab [tabName] -->
Is the problem still there under Safe mode?
Y
Your Node.js & npm version
node 20.19.0
Your Hexo and Plugin version
hexo 8.1.0
Your package.json
"dependencies": {
"hexo": "^8.1.0",
"hexo-abbrlink": "^2.2.1",
"hexo-blog-encrypt": "^3.1.9",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^4.0.0",
"hexo-generator-searchdb": "^1.5.0",
"hexo-generator-sitemap": "^3.0.1",
"hexo-generator-tag": "^2.0.0",
"hexo-htmlnano-mini": "^2.0.1",
"hexo-pangu": "^0.4.1",
"hexo-renderer-markdown-it": "^7.1.1",
"hexo-renderer-pug": "^3.0.0",
"hexo-renderer-stylus": "^3.0.1",
"hexo-server": "^3.0.0",
"hexo-wordcount": "^6.0.1",
"markdown-it-task-checkbox": "^1.0.6"
}Your site's _config.yml (Optional)
Others
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working