Skip to content

Commit eb46944

Browse files
committed
rebased on current master again
1 parent 68c58db commit eb46944

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

web/script.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ function parseMd() {
66
var GITHUB =
77
"https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md";
88
jQuery.get(GITHUB, function(text) {
9-
console.log(text);
10-
text = removeMdToc(text);
11-
console.log(text);
129
var converter = new showdown.Converter();
1310
html = converter.makeHtml(text);
1411
aDiv = $("#main_container");
@@ -24,21 +21,11 @@ function parseMd() {
2421
});
2522
}
2623

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

4431
function insertLinks() {

web/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ blockquote q:before,
219219
blockquote q:after {
220220
content: "";
221221
}
222+
222223
h3,
223224
h4,
224225
p,

0 commit comments

Comments
 (0)