Conditions | 4 |
Paths | 5 |
Total Lines | 16 |
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 | $id = $this->randomID(); |
||
39 | $desc = $this->getAttribute('desc'); |
||
40 | |||
41 | // @todo |
||
42 | return '<div data-id="'.$id.'" class="expander code-header '.$this->tag.'">'.($desc ? ' - <span>'.$desc.'</span>' : '').'</div>' |
||
43 | .'<pre id="'.$id.'" class="code-body" style="display:'.($this->getAttribute('hide') ? 'none' : 'block').';">' |
||
44 | .'<code class="language-'.$this->tag.'">'.$this->content.'</code></pre>'; // sanitize |
||
45 | } |
||
46 | |||
48 |