Skip to content

Commit 3702b06

Browse files
committed
Script.js cleanup
1 parent 45160cc commit 3702b06

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

web/script.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ $(document).ready(function() {
55
function parseMd() {
66
var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md';
77
jQuery.get(GITHUB, function(text) {
8-
// console.log(text)
9-
// text = removeMdToc(text);
10-
// console.log(text)
118
var converter = new showdown.Converter();
129
html = converter.makeHtml(text);
1310
aDiv = $('#main_container');
@@ -20,23 +17,6 @@ function parseMd() {
2017
});
2118
}
2219

23-
function removeMdToc(text) {
24-
var out = [];
25-
lines = text.match(/[^\r\n]+/g);
26-
insideContents = false;
27-
for (line of lines) {
28-
if (line.trim() === 'Contents') {
29-
insideContents = true;
30-
} else if (line.trim() === 'Main') {
31-
insideContents = false;
32-
}
33-
if (!insideContents) {
34-
out.push(line);
35-
}
36-
}
37-
return out.join('\n');
38-
}
39-
4020
function removeOrigToc() {
4121
headerContents = $('#contents')
4222
contentsList = headerContents.next()

0 commit comments

Comments
 (0)