in src/IndexDocumentBuilder.hack [111:129]
protected function renderPart(
string $title,
dict<string, Documentable> $entries,
(function(string): ?string) $get_path,
): ?string {
if (C\is_empty($entries)) {
return null;
}
return $entries
|> Vec\keys($$)
|> Vec\sort($$)
|> Vec\map(
$$,
$name ==> '- ['.Str\replace($name, '\\', '\\\\').']('.$get_path($name).')',
)
|> Str\join($$, "\n")
|> '## '.$title."\n\n".$$;
}