Upgrade to 3.1.0

This commit is contained in:
Bastian Allgeier
2019-03-19 11:07:14 +01:00
parent 418db4b09b
commit 6e074142f1
98 changed files with 1266 additions and 299 deletions

View File

@@ -58,9 +58,10 @@ class Markdown
* Parses the given text and returns the HTML
*
* @param string $text
* @param bool $inline
* @return string
*/
public function parse(string $text): string
public function parse(string $text, bool $inline = false): string
{
if ($this->options['extra'] === true) {
$parser = new ParsedownExtra;
@@ -70,7 +71,10 @@ class Markdown
$parser->setBreaksEnabled($this->options['breaks']);
// we need the @ here, because parsedown has some notice issues :(
return @$parser->text($text);
if ($inline === true) {
return @$parser->line($text);
} else {
return @$parser->text($text);
}
}
}