Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function __toString(): string |
||
21 | { |
||
22 | $config = [ |
||
23 | 'html_input' => 'escape', |
||
24 | 'allow_unsafe_links' => false, |
||
25 | 'max_nesting_level' => 100, |
||
26 | ]; |
||
27 | |||
28 | $environment = new Environment($config); |
||
29 | $environment->addExtension(new CommonMarkCoreExtension()); |
||
30 | $environment->addExtension(new TableExtension()); |
||
31 | |||
32 | $converter = new MarkdownConverter($environment); |
||
33 | |||
34 | return (string) $converter->convert($this->content); |
||
35 | } |
||
36 | } |