private function formatEntry(string $entry, bool $withExtraLine = false) : string
    {
        $entry = sprintf('- %s', $entry);
        $entry = preg_replace("/\n(?!\s{2}|$)/s", "\n  ", $entry);
        if ("\n" !== $entry[-1]) {
            // All entries need to end with a new line.
            $entry .= "\n";
        }
        if ($withExtraLine) {
            // If an extra line is requested, append it
            $entry .= "\n";
        }
        return $entry;
    }