Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 真的只能用 PrismJS 代码高亮吗? #592

Open
immccn123 opened this issue Jan 7, 2024 · 0 comments
Open

[Feature] 真的只能用 PrismJS 代码高亮吗? #592

immccn123 opened this issue Jan 7, 2024 · 0 comments
Assignees

Comments

@immccn123
Copy link

该功能的缺失是否引起你的使用不便? | Is your feature request related to a problem?

在我的场景下,是这样的。(因为自己封装了一个代码高亮的脚本)

你认为该功能应该是什么样的? | Describe the solution you'd like

希望可以提供禁用插件内置代码高亮的选项(禁用 PrismJS 的脚本、样式加载和语言映射),这样可以有更多的自定义空间。

而不是 wp_dequeue_script 一堆脚本然后手动去改这个插件文件去注释掉这个语言映射然后重新提交所有受影响的文章(

switch ($classname) {
case "html" :
$classname = "markup";
$langname = "HTML";
break;
case "xml" :
$classname = "markup";
$langname = "XML";
break;
case "svg" :
$classname = "markup";
$langname = "SVG";
break;
case "mathml" :
$classname = "markup";
$langname = "MathML";
break;
}

事实上,使用其它代码高亮插件这条路已经基本上被堵死了。

有类似功能的产品可供参考吗? | Is there some similar software?

大概是没有的。

其他信息 | Additional context

暂无。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants