File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ function load_highlight_script(callback) {
2929 script . onload = callback ;
3030 document . head . appendChild ( script ) ;
3131}
32+ function load_highlight_cpp_script ( callback ) {
33+ var script = document . createElement ( 'script' ) ;
34+ //script.src = "https://cdn.jsdelivr.net/npm/highlight.js/lib/highlight.js";
35+ //script.src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js";
36+ script . src = "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/languages/cpp.min.js" ;
37+ script . type = "text/javascript" ;
38+ script . onload = callback ;
39+ document . head . appendChild ( script ) ;
40+ }
3241
3342function load_highlight_link_stylesheet ( ) {
3443 var link = document . createElement ( 'link' ) ;
@@ -43,7 +52,11 @@ function loadMarkDownScript(callback) {
4352 load_marked_script (
4453 function ( ) {
4554 load_highlight_link_stylesheet ( ) ;
46- load_highlight_script ( callback ) ;
55+ load_highlight_script (
56+ function ( ) {
57+ load_highlight_cpp_script ( callback ) ;
58+ }
59+ ) ;
4760 }
4861 ) ;
4962}
You can’t perform that action at this time.
0 commit comments