| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function toSyntax() |
||
| 41 | { |
||
| 42 | $lines = []; |
||
| 43 | foreach ($this->subnodes as $node) { |
||
| 44 | /* |
||
| 45 | * only sublists may start with a linebreak, other blocks, like <code> must not have a linebreak before them |
||
| 46 | * or DokuWiki will interprete this as a new block altogether, instead as something that is part of the |
||
| 47 | * current <li> |
||
| 48 | */ |
||
| 49 | $prefixLinebreak = ''; |
||
| 50 | if ($node instanceof ListNode) { |
||
| 51 | $prefixLinebreak = "\n"; |
||
| 52 | } |
||
| 53 | $lines[] = $prefixLinebreak . $node->toSyntax(); |
||
| 54 | } |
||
| 55 | return implode("", $lines); |
||
| 56 | } |
||
| 63 |