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

shell代码无法高亮 #35

Open
youngledo opened this issue Dec 12, 2024 · 5 comments
Open

shell代码无法高亮 #35

youngledo opened this issue Dec 12, 2024 · 5 comments
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.

Comments

@youngledo
Copy link

youngledo commented Dec 12, 2024

开始以为是主题的问题,但经过测试应该是插件的问题:halo-dev/theme-earth#225 (comment)

Image

备注:bash正常。

@youngledo youngledo changed the title 代码无法高亮 shell代码无法高亮 Dec 12, 2024
@youngledo
Copy link
Author

不过貌似高亮颜色不正常,都很简单:
Image

@ruibaby
Copy link
Member

ruibaby commented Dec 12, 2024

看起来 highlight.js 的 shell 语言解析本身就是这样,你可以在这里验证:https://highlightjs.org/demo

Image

我不确定这是否符合预期,但推荐你向 https://github.com/highlightjs/highlight.js 反馈。

@ruibaby ruibaby added the triage/unresolved Indicates an issue that can not or will not be resolved. label Dec 12, 2024
@ruibaby
Copy link
Member

ruibaby commented Dec 12, 2024

此外,社区也在开发另外一个代码高亮的插件,对 shell 的解析看起来比较好,可以关注一下。https://github.com/halo-sigs/plugin-shiki

Image

@youngledo
Copy link
Author

为啥所有语言高亮颜色都一样,Java也是如此……

看起来 highlight.js 的 shell 语言解析本身就是这样,你可以在这里验证:https://highlightjs.org/demo

Image 我不确定这是否符合预期,但推荐你向 https://github.com/highlightjs/highlight.js 反馈。

@youngledo
Copy link
Author

此外,社区也在开发另外一个代码高亮的插件,对 shell 的解析看起来比较好,可以关注一下。https://github.com/halo-sigs/plugin-shiki

Image

这个插件没有上应用商店吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

No branches or pull requests

2 participants