Skip to content

Commit c11b181

Browse files
committed
1
1 parent 55f35ee commit c11b181

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

web/markdown.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
/////////////////////////////////////////////////////////////////////////////
1010
//===========================================================================
11+
// https://github.com/markedjs/marked
12+
//===========================================================================
13+
1114
function 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
}

0 commit comments

Comments
 (0)