protected function getIndexDocumentMarkdown()

in src/IndexDocumentBuilder.hack [60:99]


  protected function getIndexDocumentMarkdown(): string {
    $index = $this->context->getIndex();
    $paths = new IndexedPathProvider($index, $this->context->getPathProvider());

    return vec[
      $this->renderPart(
        'Functions',
        $index['functions'],
        $name ==> $paths->getPathForFunction($name),
      ),
      $this->renderPart(
        'Classes',
        $index['classes'],
        $name ==> $paths->getPathForClass($name),
      ),
      $this->renderPart(
        'Interfaces',
        $index['interfaces'],
        $name ==> $paths->getPathForInterface($name),
      ),
      $this->renderPart(
        'Traits',
        $index['traits'],
        $name ==> $paths->getPathForTrait($name),
      ),
      $this->renderPart(
        'Transparent Type Aliases',
        $index['types'],
        $name ==> $paths->getPathForTransparentTypeAlias($name),
      ),
      $this->renderPart(
        'Opaque Type Aliases',
        $index['newtypes'],
        $name ==> $paths->getPathForOpaqueTypeAlias($name),
      ),
    ]
      |> Vec\filter_nulls($$)
      |> Str\join($$, "\n\n")
      |> "# API Index\n\n".$$;
  }