無法顯示語法高亮功能
Closed this issue · 4 comments
如果沒有提供以下詳細資訊,您開立的問題回報會被無視。
問題或臭蟲
在安裝新版的 Wordpress (6.0 及 5.9.4) 中,語法高亮功能無法正常顯示。
如何重現
請告知重現此問題的步驟回何:
- 安裝新版的 Wordpress (6.0 或 5.9.4)
- 啟用 githuber-md 模組
- 啟用語法高亮功能
- 建立新文章,加入程式碼區塊
預期的行為或結果
理論上程式碼會出現彩色的字型,但是卻沒有出現。不管是用 prism.js 或是 highlight.js 都無法正常。
在預覽時,程式碼高亮的功能可以正常顯示。
清楚的說明您預期什麼樣的結果才是正常。
- 請提問題發生時的截圖
- 例如按 F12,查看 Google Chome 開發人員工具的畫面有無紅色字樣錯誤訊息。
伺服器環境
ubuntu 20 + apache2
- WordPress 版本: 5.9.4 或 6.0.2
- WP Githuber MD 版本: 1.16.1
- PHP 版本: 8.1.8
用戶端環境
- 作業系統: macos 12.5.1
- 瀏覽器: chrome, firefox
其它說明
如果有的話,請提供。
hello, @kirin-lin I had the same problem not long ago, you should go to the console and check your style theme:
You should then mark your block language, otherwise, the default style will be used.
@kirin-lin @guoqqqi 我也遇到了这个问题,后台都设置好了,但是没有高亮。在网上搜到这样一条微博,不知道是不是Bug。https://m.weibo.cn/status/4769749390855314
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been inactive for 14 days since being marked as stale.