MCPcopy Index your code
hub / github.com/HackSoftware/Django-Styleguide / replace_toc

Function replace_toc

tools/update_toc.py:26–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26def replace_toc():
27 readme = get_readme()
28 new_toc = get_new_toc()
29
30 regex = '<!-- toc -->(.|\n)+<!-- tocstop -->'
31
32 new_readme = re.sub(regex, new_toc, readme)
33
34 save_readme(new_readme)
35
36 print('TOC updated ...')
37
38
39def main():

Callers 1

mainFunction · 0.85

Calls 3

get_readmeFunction · 0.85
get_new_tocFunction · 0.85
save_readmeFunction · 0.85

Tested by

no test coverage detected