Closed pilgrimlyieu closed 2 months ago
On Android side. This is the perfect I think, with a copy button and no fold.
I am unable to reproduce this bug; the mermaid code block on your webpage is not folded. Can you confirm if the issue still exists?
I am unable to reproduce this bug; the mermaid code block on your webpage is not folded. Can you confirm if the issue still exists?
Yeah, that's strange.
One possible scenario is that a race condition has occurred here. The mermaid script loads slowly, so the mermaid source code is initially treated as a regular code block with fold and copy buttons added, and only afterward is it rendered to svg format.
I pushed to the mermaid branch: https://github.com/next-theme/hexo-theme-next/tree/mermaid You can check if it solves the issue
Thanks, it's normal now
Great, I will merge it into the master branch.
Great, I will merge it into the master branch.
Sadly, the copy button disappears too. Should I open a new issue for this feature request?
The copy button is actually a bug; it requires the code block style to function properly. If users select a different highlighting engine (prismjs), style errors may occur. I will look into how to handle this when I have time later.
You can check if the copy button is working now: https://github.com/next-theme/hexo-theme-next/commit/5c024800e6b484f844783ad379758e3e57f7a4b3
This issue has been added to the latest roadmap. :tada:
You can check if the copy button is working now: 5c02480
There's copy button now, but it can't make copy action. Also breaks normal codeblock.
I've fixed it again, you can checkout this commit: https://github.com/next-theme/hexo-theme-next/commit/ddecbe36283bf7be2634ab1f83abaff0ac9f791e
I've fixed it again, you can checkout this commit: ddecbe3
It works normally now. Appreciating your great work!
Issue Checklist
Expected behavior
Fold other codeblock, but don't fold mermaid codeblock.
It would be better if there's a copy button on mermaid codeblock as shown below by the way.
Actual behavior
Steps to reproduce the behavior
Node.js and NPM Information
Package dependencies Information
Hexo Configuration
NexT Configuration
Other Information
Relevant to #694.
Besides, it works as expected sometimes.
Have issue: https://pilgrimlyieu.github.io/notes/D-discrete-mathematics/13-lattice#%E6%A0%BC%E5%90%8C%E6%80%81
No issue: https://pilgrimlyieu.github.io/daily/2024-04#Mermaid