CTFer
&&Web开发
&&安卓开发
- QQ:
NzE4MjUxMw==
- Team:
X
- Blog: https://www.xcnte.com
为什么要努力?因为我要做的事有很多,我要去的地方很远,我喜欢的人超完美
基于prismjs的代码语法高亮typecho插件,支持众多常见的代码语言高亮显示,提供11种代码高亮风格自由切换,支持显示代码语言类型、行号,以及支持复制代码到剪切板功能
CTFer
&& Web开发
&& 安卓开发
NzE4MjUxMw==
X
为什么要努力?因为我要做的事有很多,我要去的地方很远,我喜欢的人超完美
用的主题handsome8.2最新版本,已全部按照文档设置,添加一个收缩框正常显示,添加多个收缩框时出现样式错误问题,详细可以查看http://blog.xinxing.space/index.php/archives/3/
大佬辛苦了~
prism.js 官网那边好像是“定制”的,可能这里只集成了少数热门的语言,可能就像 #2 说的 golang 没有选上。
我是看到官网那边支持 llvm 所以好奇 llvm 高亮哪去了。
我是抱着试试看的态度在官网下载那里给出的源码,发现
Prism.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:true|false)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/};
的开头
Prism.languages.llvm= //...
一行就是一个语言支持,自己选上,找到,然后 static/prism.js
自己加上就可以了,要注意上下文,加对地方(笑)。
多选几个热门语言吧(笑),自己改吧(迫真)。
显示server error
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.