diff --git a/MDFormatter.php b/MDFormatter.php index 22908c1..404680c 100644 --- a/MDFormatter.php +++ b/MDFormatter.php @@ -143,18 +143,19 @@ final class MDFormatter { /** * Applies markdown formatting for an unordered list item. * - * @param string $content Content of the list item. + * @param string $content Content of the list item. + * @param string $delimiter Starting character of a line. * * @return string */ - public static function formatMarkdownUnorderedListItem(string $content):string { + public static function formatMarkdownUnorderedListItem(string $content, string $delimiter = '-'):string { if (\strpos($content, PHP_EOL) === false) { - return '- ' . $content . PHP_EOL; + return $delimiter . ' ' . $content . PHP_EOL; } $lines = \explode(PHP_EOL, $content); - $output = '- ' . $lines[0] . PHP_EOL; + $output = $delimiter . ' ' . $lines[0] . PHP_EOL; foreach ($lines as $i => $line) { if ($i === 0) continue;