Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
MarkdownConverter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
parse | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Hyde\Framework\Actions; |
4 | |
5 | use Hyde\Framework\Services\MarkdownConverterService; |
6 | |
7 | /** |
8 | * Converts Markdown into HTML. |
9 | */ |
10 | class MarkdownConverter |
11 | { |
12 | /** |
13 | * Parse the Markdown into HTML. |
14 | * |
15 | * @return string $html |
16 | */ |
17 | public static function parse(string $markdown, ?string $sourceModel = null): string |
18 | { |
19 | return (new MarkdownConverterService($markdown, $sourceModel))->parse(); |
20 | } |
21 | } |