File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta name ="viewport " content ="width=device-width ">
5
5
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.css " />
6
+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.0/styles/github-gist.min.css ">
6
7
< script src ="https://cdn.jsdelivr.net/npm/marked/marked.min.js "> </ script >
7
8
< script src ="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js "> </ script >
8
9
< script src ="https://unpkg.com/vue-async-computed@3.8.1 "> </ script >
10
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.0/highlight.min.js "> </ script >
9
11
< script src ="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js "> </ script >
10
12
< style >
11
13
@media (max-width : 767px ) {
120
122
return stack . concat ( value ) ;
121
123
} , [ ] ) ;
122
124
ast . links = { } ;
123
- return marked . parser ( ast ) ;
125
+
126
+ return marked . parser ( ast , {
127
+ highlight ( code , lang ) {
128
+ return hljs . highlight ( lang ? lang : 'rust' , code ) . value ;
129
+ }
130
+ } ) ;
124
131
}
125
132
} ,
126
133
created : async function ( ) {
You can’t perform that action at this time.
0 commit comments