jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly
https://butterfly.js.org
Apache License 2.0
6.8k stars 1.24k forks source link

[Bug]: 直接点代码框复制按钮复制代码,复制到bash上会多一个换行符 #1473

Closed Firestar-Reimu closed 1 month ago

Firestar-Reimu commented 2 months ago

使用的 Butterfly 版本? | What version of Butterfly are you use?

4.7.0

是否修改过主题文件? || Has the theme files been modified?

是 (Yes)

使用的瀏覽器? || What browse are you using?

Edge

使用的系統? || What operating system are you using?

Linux

依賴插件 | Package dependencies Information

npm uninstall hexo-renderer-marked
npm install hexo-renderer-markdown-it
npm install katex @renbaoshuo/markdown-it-katex
npm install hexo-generator-search
npm install markdown-it-task-lists

問題描述 | Describe the bug

图片

(实际上你自己的网站 https://butterfly.js.org/ 也有这个问题,所以4.13.0依然有这个问题)

出現問題網站 | Website

https://blog.firestar-reimu.top

jerryc127 commented 2 months ago

我试了你的网站 复制到 window powershell 没有这个问题

Firestar-Reimu commented 2 months ago

所以这是个bash/剪贴板问题?

但是我去github/用sphinx写的网站,点那个复制图标复制就没有问题啊

jerryc127 commented 2 months ago

我的那段複製代碼是獲取了你代碼塊的内容,你代碼塊要是有換行符,那複製的内容就有

或者你複製到其他地方,比如 vscode ,記事本 啥的,看看是不是有換行符

我在windows10 測試,沒這個問題

Firestar-Reimu commented 2 months ago

我的源代码(markdown)是这个

https://github.com/Firestar-Reimu/Blog-source/blob/main/source/_posts/ArchLinux-Installation.md

我在github上直接复制代码块到Linux没有问题

我在我的网站上复制代码块到Windows也没问题

但是我在网站上复制代码块到Linux就有问题

jerryc127 commented 2 months ago

linux 上有沒有其他的 terminal ? 複製到其它 terminal 看看是不是一樣的情況

Firestar-Reimu commented 2 months ago

我没装其它terminal,但是我试了其它网站发现不只是butterfly主题,其它hexo主题都有问题

我试着安装了zsh发现有一样的情况

和这个不知道有没有关系 https://stackoverflow.com/questions/66274933/removing-whitespace-in-html-when-using-a-copy-button


操作系统: Arch Linux KDE Plasma 版本: 6.0.3 KDE 程序框架版本: 6.0.0 Qt 版本: 6.6.3 内核版本: 6.8.2-arch2-1 (64 位) 图形平台: Wayland 处理器: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz 内存: 15.3 GiB 内存 图形处理器: Mesa Intel® Xe Graphics 制造商: LENOVO 产品名称: 20WKA000CD 系统版本: ThinkPad X13 Gen 2i

jerryc127 commented 2 months ago

如果有問題 應該所有平臺都一樣 你要不試下其它的 terminal? 如果正常,就代表你現在使用的這個有問題,看看 terminal 的配置啥的

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.