You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found the reason.
This issue (typing markdown fenced code blocks in html comments) only appears when I enable one of built-in syntax highlight libraries. In my old environment, I disabled them and use Prettify instead, and it worked well.
I'll use another highlighter.
Text 1
<!--
Commented text 1
{% codeblock %}
A commented code block
{% endcodeblock %}
Commented text 2
-->
Text 2
Output:
<p>Text 1</p>
<!--
Commented text 1
<pre><code>A commented code block</code></pre>
<p>Commented text 2</p>
<p>–></p>
<p>Text 2</p>
...
</html>-->
I should edit the title.
FZQ0003
changed the title
Fenced code blocks in comments were incorrectly converted
Code blocks in HTML comments were incorrectly converted
Mar 12, 2024
Check List
hexo version
to check)Expected behavior
In my old blog directory (replaced theme with landscape):
Output:
Actual behavior
In my newly installed blog directory:
Output:
How to reproduce?
Write a post like this and then start the server:
Is the problem still there under
Safe mode
?Cannot generate pages under safe mode.
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)No response
Others
Additionally, here is a list of plugins used in my OLD environment:
When I was trying to setup a new environment, this issue appeared. I don't know why.
The text was updated successfully, but these errors were encountered: