Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function serialize(string $input): string |
||
17 | { |
||
18 | $converter = new HtmlConverter(['header_style' => 'atx']); |
||
19 | |||
20 | // Override HTML comments handling to preserve 'more' tags. |
||
21 | $environment = $converter->getEnvironment(); |
||
22 | $environment->addConverter(new CommentConverter()); |
||
23 | |||
24 | $markdown = $converter->convert($input); |
||
25 | // Ends up with prepended slash for whatever reason... |
||
26 | $markdown = str_replace('\<!--more-->', '<!--more-->', $markdown); |
||
27 | |||
28 | return $markdown; |
||
29 | } |
||
39 |