Files
pandoc/test/pptx-reader/table-spans.native
T
Nacho García 83840a6760 Pptx reader: read merged table cells as spans.
Merged cells in a table were ignored: a merged cell's text stayed in
its first cell, and every cell it covered was read as an empty cell of
its own.

A cell's `gridSpan` and `rowSpan` now become its column and row span,
and the cells it covers (`hMerge`, `vMerge`) are left out. As a cell
can't span the header row and the body, a span from the header row is
kept to that row; the body cells it covered become empty cells. Row
spans are clipped to the rows there are.

The test fixture was written with python-pptx 1.0.2.
2026-11-03 07:34:39 -08:00

91 lines
2.4 KiB
Plaintext

Pandoc
Meta { unMeta = fromList [] }
[ Header
2
( "slide-1" , [] , [] )
[ Str "Merged" , Space , Str "cells" ]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 2)
[ Plain [ Str "Group" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Total" ] ]
]
])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 2)
(ColSpan 1)
[ Plain [ Str "a" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [] ]
]
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 2)
[ Plain [ Str "wide" ] ]
]
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "b" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
]