blinkfox / hexo-theme-matery

A beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com
https://blinkfox.github.io/
Apache License 2.0
5.23k stars 1.25k forks source link

最新版本的代码高亮未生效用,安装了prism插件,也修改了配置 #243

Closed EvanZhou666 closed 4 years ago

EvanZhou666 commented 4 years ago

https://evanzhou666.github.io/2019/11/16/java8/

blinkfox commented 4 years ago

我看你页面的代码高亮是生效了的,但是显示得有些奇怪,应该是你的 Markdown 的代码块儿写的有问题。你的 Markdown 源文件长什么样,我看看

EvanZhou666 commented 4 years ago

 

您好,我的代码类似于这样的

------------------ 原始邮件 ------------------ 发件人: "闪烁之狐 (blinkfox)"<notifications@github.com>; 发送时间: 2019年11月17日(星期天) 晚上11:15 收件人: "blinkfox/hexo-theme-matery"<hexo-theme-matery@noreply.github.com>; 抄送: "Mr.zhou"<1043056891@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [blinkfox/hexo-theme-matery] 最新版本的代码高亮未生效用,安装了prism插件,也修改了配置 (#243)

我看你页面的代码高亮是生效了的,但是显示得有些奇怪,应该是你的 Markdown 的代码块儿写的有问题。你的 Markdown 源文件长什么样,我看看

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

blinkfox commented 4 years ago

你这个代码,我看不出来这是啥,&nbsp;?

EvanZhou666 commented 4 years ago

1、指向静态方法的方法引用

Integer::parseInt 等价于 (String str) ->Integer.parseInt(str)

2、指向实例对象的方法引用 (你在引用一个对象的方法,而这个对象本身是Lambda的一个参数)

List<String> list = Arrays.asList("a","b","c");
        list.sort(String::compareTo);   //等价于 (String str1,String str2)->str1.compareTo(str2);
blinkfox commented 4 years ago

我试了下,没你说得这个问题,你需要在代码快的后面加上编程语言的小写字母标识,比如:

```java

生成的效果:

Snip20191117_1

EvanZhou666 commented 4 years ago

https://s2.ax1x.com/2019/11/17/Ms6Pdx.png 我有加语言的小写字母的 代码截图如上

blinkfox commented 4 years ago

你把你的 Markdown 文件发给我。

EvanZhou666 commented 4 years ago

我重新安装了环境,然后解决了这个问题。