| @@ 43-54 (lines=12) @@ | ||
| 40 | /** |
|
| 41 | * Consume lines for an ordered list |
|
| 42 | */ |
|
| 43 | protected function consumeOl($lines, $current) |
|
| 44 | { |
|
| 45 | // consume until newline |
|
| 46 | ||
| 47 | $block = [ |
|
| 48 | 'list', |
|
| 49 | 'list' => 'ol', |
|
| 50 | 'attr' => [], |
|
| 51 | 'items' => [], |
|
| 52 | ]; |
|
| 53 | return $this->consumeList($lines, $current, $block, 'ol'); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Consume lines for an unordered list |
|
| @@ 59-69 (lines=11) @@ | ||
| 56 | /** |
|
| 57 | * Consume lines for an unordered list |
|
| 58 | */ |
|
| 59 | protected function consumeUl($lines, $current) |
|
| 60 | { |
|
| 61 | // consume until newline |
|
| 62 | ||
| 63 | $block = [ |
|
| 64 | 'list', |
|
| 65 | 'list' => 'ul', |
|
| 66 | 'items' => [], |
|
| 67 | ]; |
|
| 68 | return $this->consumeList($lines, $current, $block, 'ul'); |
|
| 69 | } |
|
| 70 | ||
| 71 | private function consumeList($lines, $current, $block, $type) |
|
| 72 | { |
|