File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ $(document).ready(function() {
5
5
function parseMd ( ) {
6
6
var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md' ;
7
7
jQuery . get ( GITHUB , function ( text ) {
8
- // console.log(text)
9
- // text = removeMdToc(text);
10
- // console.log(text)
11
8
var converter = new showdown . Converter ( ) ;
12
9
html = converter . makeHtml ( text ) ;
13
10
aDiv = $ ( '#main_container' ) ;
@@ -20,23 +17,6 @@ function parseMd() {
20
17
} ) ;
21
18
}
22
19
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
-
40
20
function removeOrigToc ( ) {
41
21
headerContents = $ ( '#contents' )
42
22
contentsList = headerContents . next ( )
You can’t perform that action at this time.
0 commit comments