Skip to content

Commit 9cd73d3

Browse files
authored
Merge pull request #1194 from phpDocumentor/backport/1.x/pr-1193
[1.x] Merge pull request #1193 from phpDocumentor/fix/table-colspan
2 parents 7ff4221 + edc712a commit 9cd73d3

File tree

17 files changed

+778
-1
lines changed

17 files changed

+778
-1
lines changed

packages/guides-restructured-text/src/RestructuredText/Parser/Productions/Table/GridTableBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private function extractTableRows(ParserContext $context): array
6767
}
6868

6969
/** @param array<int, int> $columnRanges */
70-
private function extractRow(array $columnRanges, string $line, int &$currentSpan): TableRow
70+
private function extractRow(array $columnRanges, string $line, int $currentSpan): TableRow
7171
{
7272
$row = new TableRow();
7373
$currentColumnStart = null;

tests/Functional/tests/pretty-table-col-span/pretty-table-col-span.html tests/Functional/tests/table-grid-col-span/table-grid-col-span.html

+6
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@
1818
<td>body row 2</td>
1919
<td colspan="3">Cells may span columns.</td>
2020
</tr>
21+
<tr>
22+
<td>body row 1, column 1</td>
23+
<td>column 2</td>
24+
<td>column 3</td>
25+
<td>column 4</td>
26+
</tr>
2127
</tbody>
2228
</table>

tests/Functional/tests/pretty-table-col-span/pretty-table-col-span.rst tests/Functional/tests/table-grid-col-span/table-grid-col-span.rst

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
+------------------------+------------+----------+----------+
77
| body row 2 | Cells may span columns. |
88
+------------------------+----------------------------------+
9+
| body row 1, column 1 | column 2 | column 3 | column 4 |
10+
+------------------------+------------+----------+----------+

0 commit comments

Comments
 (0)