diff --git a/lib/Formatter.php b/lib/Formatter.php index 93a447aa..4eb04263 100644 --- a/lib/Formatter.php +++ b/lib/Formatter.php @@ -99,25 +99,17 @@ class Formatter{ /** * Convert a string of Markdown into an HTML fragment. */ - public static function MarkdownToHtml(?string $text): string{ + public static function MarkdownToHtml(?string $text, bool $inline = false): string{ if(!isset(Formatter::$_MarkdownParser)){ Formatter::$_MarkdownParser = new Parsedown(); Formatter::$_MarkdownParser->setSafeMode(true); } - return Formatter::$_MarkdownParser->text($text); - } - - /** - * Convert a string of Markdown into inline HTML. - */ - public static function MarkdownToInlineHtml(?string $text): string{ - if(!isset(Formatter::$_MarkdownParser)){ - Formatter::$_MarkdownParser = new Parsedown(); - Formatter::$_MarkdownParser->setSafeMode(true); + if($inline){ + return Formatter::$_MarkdownParser->line($text); + }else{ + return Formatter::$_MarkdownParser->text($text); } - - return Formatter::$_MarkdownParser->line($text); } /** diff --git a/www/artworks/get.php b/www/artworks/get.php index 6b3e3166..e775c3f7 100644 --- a/www/artworks/get.php +++ b/www/artworks/get.php @@ -161,12 +161,12 @@ catch(Exceptions\InvalidPermissionsException){ Exception !== null){ ?>

Public domain status exception reason

- Exception) ?> + Exception, false) ?> Notes !== null){ ?>

Special notes

- Notes) ?> + Notes, false) ?> CanBeEditedBy(Session::$User)){ ?> diff --git a/www/contribute/wanted-ebooks.php b/www/contribute/wanted-ebooks.php index 77773d0c..30b367ad 100644 --- a/www/contribute/wanted-ebooks.php +++ b/www/contribute/wanted-ebooks.php @@ -18,7 +18,7 @@ function WantedEbooks(Enums\EbookPlaceholderDifficulty $difficulty, ?bool $showP by AuthorsString) ?>ContributorsHtml != ''){ ?>. ContributorsHtml ?> - EbookPlaceholder->Notes)){ ?>(EbookPlaceholder->Notes) ?>) + EbookPlaceholder->Notes)){ ?>(EbookPlaceholder->Notes, true) ?>)

Ebook ID: EbookId ?>, View placeholder