File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 88
99/////////////////////////////////////////////////////////////////////////////
1010//===========================================================================
11+ // https://github.com/markedjs/marked
12+ //===========================================================================
13+
1114function loadMarkDownScript ( callback ) {
1215 var script = document . createElement ( 'script' ) ;
1316 //script.src = "https://cdn.jsdelivr.net/npm/marked/marked.min.js";
@@ -17,17 +20,17 @@ function loadMarkDownScript(callback) {
1720 document . head . appendChild ( script ) ;
1821}
1922
20- function renderMarkdwon ( markdown_view_id , markdown_url ) {
23+ function renderMarkdwon ( markdownViewId , markdownFileURL ) {
2124 var xmlhttp = new XMLHttpRequest ( ) ;
2225 xmlhttp . onreadystatechange =
2326 function ( ) {
2427 if ( this . readyState == 4 && this . status == 200 ) {
2528 const markdown = this . responseText ;
2629 const html = marked . parse ( markdown ) ;
27- document . getElementById ( markdown_view_id ) . innerHTML = html ;
30+ document . getElementById ( markdownViewId ) . innerHTML = html ;
2831 }
2932 }
3033 ;
31- xmlhttp . open ( "GET" , markdown_url , true ) ;
34+ xmlhttp . open ( "GET" , markdownFileURL , true ) ;
3235 xmlhttp . send ( ) ;
3336}
You can’t perform that action at this time.
0 commit comments