'
for route in routes_list:
method = html_lib.escape(route['method'])
path = html_lib.escape(route['path'])
desc = html_lib.escape(route['description'])
# Replace path parameters with styled spans
# Match escaped angle brackets from html.escape
path_display = re.sub(
r'<([^:>]+):([^>]+)>',
r'
:\2',
path
)
path_display = re.sub(
r'<([^>]+)>',
r'
\1',
path_display
)
endpoints_html += (
f'
'
)
endpoints_html += f'
{method}'
endpoints_html += f'
{path_display}
'
endpoints_html += f'
{desc}'
endpoints_html += '
'
endpoints_html += '