MCPcopy Index your code
hub / github.com/billryan/algorithm-exercise / get_title

Function get_title

scripts/check_summary.py:78–89  ·  view source on GitHub ↗
(md_file)

Source from the content-addressed store, hash-verified

76
77
78def get_title(md_file):
79 lines = open(md_file)
80 title = ''
81 for line in lines:
82 if re.match('^# ', line):
83 if re.search(' - ', line):
84 title = re.split(' - ', line)[2:].rstrip()
85 else:
86 title = line[2:].rstrip()
87 break
88
89 return title
90
91
92summ_dir_file = get_summary_dir_file(SUMMARY_MD)

Callers 1

fix_summary_mdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected