aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/textprocessors/MarkdownProcessor.php
blob: 15f2f486a3355301bbb68df0eb87c49b34cbc4cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php


namespace r7r\cms\sys\textprocessors;

use Michelf\Markdown;

/**
 * A textprocessor that uses markdown to generate HTML.
 */
class MarkdownProcessor implements Textprocessor
{
    public function apply(string $input): string
    {
        return Markdown::defaultTransform($input);
    }

    public function showInBackend(): bool
    {
        return true;
    }
}