diff --git a/library/Icingadb/Common/MarkdownText.php b/library/Icingadb/Common/MarkdownText.php new file mode 100644 index 00000000..5d1a1418 --- /dev/null +++ b/library/Icingadb/Common/MarkdownText.php @@ -0,0 +1,28 @@ + 'markdown']; + + /** + * MarkdownText constructor. + * + * @param string $text + */ + public function __construct($text) + { + $this->add((new DeferredText(function () use ($text) { + return Markdown::text($text); + }))->setEscaped(true)); + } +}