MCPcopy
hub / github.com/aosabook/500lines / format_title_reference

Function format_title_reference

contingent/code/example/blog_project.py:68–71  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

66 dirname = os.path.dirname(path)
67 body = info['body']
68 def format_title_reference(match):
69 filename = match.group(1)
70 title = title_of(os.path.join(dirname, filename))
71 return '<i>{}</i>'.format(title)
72 body = re.sub(r'title_of\(([^)]+)\)', format_title_reference, body)
73 return body
74

Callers

nothing calls this directly

Calls 2

title_ofFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected