diff --git a/web/script.js b/web/script.js index 553f6e8..c03b717 100644 --- a/web/script.js +++ b/web/script.js @@ -5,9 +5,6 @@ $(document).ready(function() { function parseMd() { var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md'; jQuery.get(GITHUB, function(text) { - // console.log(text) - // text = removeMdToc(text); - // console.log(text) var converter = new showdown.Converter(); html = converter.makeHtml(text); aDiv = $('#main_container'); @@ -20,23 +17,6 @@ function parseMd() { }); } -function removeMdToc(text) { - var out = []; - lines = text.match(/[^\r\n]+/g); - insideContents = false; - for (line of lines) { - if (line.trim() === 'Contents') { - insideContents = true; - } else if (line.trim() === 'Main') { - insideContents = false; - } - if (!insideContents) { - out.push(line); - } - } - return out.join('\n'); -} - function removeOrigToc() { headerContents = $('#contents') contentsList = headerContents.next()