Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | protected function transform():string{ |
||
31 | |||
32 | if(empty($this->content)){ |
||
33 | return ''; |
||
34 | } |
||
35 | |||
36 | $this->clearPseudoClosingTags(); |
||
37 | |||
38 | $exceptions = [ |
||
39 | 'js' => 'javascript', |
||
40 | 'pre' => '', |
||
41 | 'code' => '', |
||
42 | 'noparse' => '', |
||
43 | ]; |
||
44 | |||
45 | $lang = $exceptions[$this->tag] ?? $this->tag; |
||
46 | |||
47 | return PHP_EOL.'```'.$lang.PHP_EOL.$this->content.PHP_EOL.'```'.PHP_EOL; |
||
48 | } |
||
49 | |||
51 |