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

Vue代码块无法高亮显示 #440

Closed
hooray opened this issue Oct 11, 2018 · 4 comments
Closed

Vue代码块无法高亮显示 #440

hooray opened this issue Oct 11, 2018 · 4 comments

Comments

@hooray
Copy link

hooray commented Oct 11, 2018

有办法解决么?还是需要由 hexo 去解决?

@sli1989
Copy link
Collaborator

sli1989 commented Oct 11, 2018

u mean this situation and this ?

If works, please tell me.

@maple3142
Copy link
Contributor

Do you mean vue's SFC doesn't have syntax highlight?
Maybe you could mark it as html instead because vue's SFC is a valid html.
It is because highlight.js only support HTML but vue's SFC. https://highlightjs.org/static/demo/

@stevenjoezhang
Copy link
Contributor

确实需要由 hexo ,或者说 hexo 的依赖 highlight.js 去解决

highlightjs/highlight.js#1929

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Nov 16, 2019

可以安装这个插件: https://github.com/highlightjs/highlightjs-vue/
然后修改hexo-util中highlight相关的代码。

GitHub
Contribute to highlightjs/highlightjs-vue development by creating an account on GitHub.

wens07 pushed a commit to wens07/hexo-theme-next that referenced this issue May 8, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants