Source of file PHPMarkdownMarkdownRenderer.php
Size: 0,928 Bytes - Last Modified: 2021-12-23T10:56:55+00:00
/var/www/docs.ssmods.com/process/src/src/Renderer/PHPMarkdownMarkdownRenderer.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php namespace UndefinedOffset\Markdown\Renderer; use Michelf\Markdown; /** * Class PHPMarkdownMarkdownRenderer * @package UndefinedOffset\Markdown\Renderer */ class PHPMarkdownMarkdownRenderer implements IMarkdownRenderer { /** * Returns the supplied Markdown as rendered HTML * @param string $markdown The markdown to render * @return string The rendered HTML */ public function isSupported() { $exists = class_exists(Markdown::class); if (!$exists) { return "Unable to find the php-markdown class (\Michelf\Markdown) on the classpath."; } return $exists; } /** * Returns the supplied Markdown as rendered HTML * @param string $markdown The markdown to render * @return string The rendered HTML */ public function getRenderedHTML($markdown) { return Markdown::defaultTransform($markdown); } } |