https://bugs.documentfoundation.org/show_bug.cgi?id=168300

--- Comment #3 from Daniel Reeves <[email protected]> ---
This looks like a format limitation rather than a Writer defect, and it may be
worth stating the intended behaviour on the meta tracker (bug 167521).

GitHub Flavored Markdown tables have no colspan/rowspan: the grammar is one
delimiter row followed by rows of equal cell count, so a merged cell cannot be
represented at all. Any exporter therefore has to pick a lossy strategy, and
there are three in the wild:

1. Duplicate the merged value into every covered cell. Round-trips into a
   spreadsheet cleanly, but changes the semantics -- one 3-column header
   becomes three identical headers.
2. Put the value in the first covered cell and leave the rest empty. This is
   what most PDF-to-Markdown converters do, and it matches what a reader of
   the Markdown source visually expects.
3. Fall back to a raw HTML <table> block for that one table. Preserves the
   merge exactly, and GFM does render raw HTML, but the output is no longer
   plain Markdown, which defeats the point for most people exporting.

Option 2 is the least surprising default. For comparison I ran the same
document through a browser-side PDF to Markdown converter, https://pdf2md.me/ ,
which has to reconstruct tables from glyph coordinates because a PDF has no
table object at all, and it lands on the same choice -- mainly because
anything else produces a grid that no longer lines up with the visual layout.

Whichever strategy Writer picks, it would help to say so in the export dialog,
since the loss is silent otherwise.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to