table of content

This commit is contained in:
Rohit Tanwar
2018-01-21 14:47:07 +05:30
parent dd7c3c2b7b
commit a1b76ad559
2 changed files with 16 additions and 15 deletions

View File

@ -11,30 +11,31 @@
## Table of Content ## Table of Content
# :books: List # :books: List
<ul><li>chunk</li> <ul><li><a href = "#chunk">chunk</a></li>
<li>compact</li> <li><a href = "#compact">compact</a></li>
<li>count_occurences</li> <li><a href = "#count_occurences">count_occurences</a></li>
<li>deep_flatten</li> <li><a href = "#deep_flatten">deep_flatten</a></li>
<li>difference</li> <li><a href = "#difference">difference</a></li>
<li>shuffle</li> <li><a href = "#shuffle">shuffle</a></li>
<li>spread</li> <li><a href = "#spread">spread</a></li>
<li>zip</li> <li><a href = "#zip">zip</a></li>
</ul> </ul>
# :scroll: String # :scroll: String
<ul><li>count_vowels</li> <ul><li><a href = "#count_vowels">count_vowels</a></li>
</ul> </ul>
# :heavy_division_sign: Math # :heavy_division_sign: Math
<ul><li>gcd</li> <ul><li><a href = "#gcd">gcd</a></li>
<li>lcm</li> <li><a href = "#lcm">lcm</a></li>
<li>max_n</li> <li><a href = "#max_n">max_n</a></li>
<li>min_n</li> <li><a href = "#min_n">min_n</a></li>
</ul> </ul>
<hr></hr> <hr></hr>
## :books: List ## :books: List
### chunk ### chunk

View File

@ -38,9 +38,9 @@ toAppend += '## Table of Content \n'
for category in tag_dict: for category in tag_dict:
toAppend = toAppend + '# ' + EMOJIS[category] + ' ' + title_case(category) +'\n\n <ul>' toAppend = toAppend + '# ' + EMOJIS[category] + ' ' + title_case(category) +'\n\n <ul>'
for snippet in tag_dict[category]: for snippet in tag_dict[category]:
toAppend += f'<li>{snippet}</li>\n' toAppend += f'<li><a href = "#{snippet}">{snippet}</a></li>\n'
toAppend += '</ul>\n\n' toAppend += '</ul>\n\n'
toAppend += '<hr></hr> \n' toAppend += '<hr></hr> \n\n'
for category in tag_dict: for category in tag_dict:
toAppend = toAppend + '## ' + EMOJIS[category] + ' ' + title_case(category) +'\n\n' toAppend = toAppend + '## ' + EMOJIS[category] + ' ' + title_case(category) +'\n\n'
for snippet in tag_dict[category]: for snippet in tag_dict[category]: