Files
John MacFarlane 78efe58641 T.P.Writer.Shared gridTable: more grid table fixes.
Fix headings with colspans. If the heading contains a colspan, we still
need to include information in the header line about the colspecs.

Fix headerless tables.  The top line should encode colspan information.

Closes #10855.
2025-05-28 12:46:00 -07:00

1.2 KiB

% pandoc -t markdown
+----------+----+
| h1       | h2 |
+:===:+===:+:===+
| A        | B  |
+-----+----+----+
| C   | D  | E  |
+-----+----+----+
^D
+-------------+----+
| h1          | h2 |
+:====:+=====:+:===+
| A           | B  |
+------+------+----+
| C    | D    | E  |
+------+------+----+

% pandoc -t markdown
+-----+----+----+
| h1  | h2 | h3 |
+:===:+===:+:===+
| A        | B  |
+-----+----+----+
| C   | D  | E  |
+-----+----+----+
^D
+------+------+----+
| h1   | h2   | h3 |
+:====:+=====:+:===+
| A           | B  |
+------+------+----+
| C    | D    | E  |
+------+------+----+

% pandoc -t markdown
+:------:+:-----------:+
| hello  | ![a](b.png) |
+--------+-------------+
| hello  | ![c](b.png) |
+--------+-------------+
^D
+:------:+:-----------:+
| hello  | ![a](b.png) |
+--------+-------------+
| hello  | ![c](b.png) |
+--------+-------------+

% pandoc -t markdown
+:------:+:-----------:+
| hello  | ![a](b.png) |
+--------+-------------+
| hello  | ![c](b.png) |
+--------+-------------+
^D
+:------:+:-----------:+
| hello  | ![a](b.png) |
+--------+-------------+
| hello  | ![c](b.png) |
+--------+-------------+