protected function renderToHTML()

in src/IndexDocumentBuilder.hack [43:57]


  protected function renderToHTML(
    string $markdown,
  ): string {
    $body = $markdown
      |> Markdown\parse(
        (new Markdown\ParserContext())
          ->setSourceType(Markdown\SourceType::TRUSTED),
        $$,
      )
      |> (new Markdown\HTMLRenderer(new Markdown\RenderContext()))
        ->render($$);

    return '<html><head><title>API Index</title></head><body>'.
      $body."</body></html>\n";
  }