@@ -92,6 +92,9 @@ |
||
92 | 92 | return $columns; |
93 | 93 | } |
94 | 94 | |
95 | + /** |
|
96 | + * @param string $line |
|
97 | + */ |
|
95 | 98 | private function parseRow($line, array $columns, $type = TableCell::TYPE_BODY) |
96 | 99 | { |
97 | 100 | $cells = RegexHelper::matchAll(self::REGEXP_CELLS, $line); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | |
49 | - $table = new Table(function (Cursor $cursor) use (&$table, $columns) { |
|
49 | + $table = new Table(function(Cursor $cursor) use (&$table, $columns) { |
|
50 | 50 | $row = $this->parseRow($cursor->getLine(), $columns); |
51 | 51 | if (null === $row) { |
52 | 52 | return false; |
@@ -114,10 +114,10 @@ |
||
114 | 114 | |
115 | 115 | // If we have a single match we might be using a single-column table |
116 | 116 | if (!is_array($cells[0])) { |
117 | - // If this isn't a single-column table, this is an invalid row |
|
118 | - if (1 !== count($columns)) { |
|
119 | - return; |
|
120 | - } |
|
117 | + // If this isn't a single-column table, this is an invalid row |
|
118 | + if (1 !== count($columns)) { |
|
119 | + return; |
|
120 | + } |
|
121 | 121 | |
122 | 122 | // Single-column table cells that have [body] content must be prefixed with | to not be treated as captions |
123 | 123 | if (null !== $this->parseCaption($line)) { |