Files
pandoc/test/pptx-reader/runs.native
T
Nacho García 5fee311c6a Pptx reader: don't add spaces between text runs. (#12021)
The text of a paragraph was built by joining all its `a:t` elements
with spaces. A run boundary can fall anywhere, often inside a word or
before punctuation, so "Ever|worker" read as "Ever worker" and
"openai|, anthropic" as "openai , anthropic". Line breaks (`a:br`)
were dropped, and each paragraph went into a single Str.

Runs and fields are now concatenated as written, `a:br` becomes a
LineBreak, and the text is split into Str and Space with the builder.
Slide titles, table cells and SmartArt nodes, which are built from the
same text, get the same treatment; their paragraphs are still joined
with a space.

The helpers live in Text.Pandoc.Readers.OOXML.Shared, as SmartArt
can't import from Shapes.

The test fixture was written with python-pptx 1.0.2.

Closes #12016.
2026-10-29 21:24:37 -07:00

51 lines
1.2 KiB
Plaintext

Pandoc
Meta { unMeta = fromList [] }
[ Header
2
( "slide-1" , [] , [] )
[ Str "Everworker" , Space , Str "diagram" ]
, Para [ Str "Hello" , Space , Str "world" ]
, Para [ Str "openai," , Space , Str "anthropic" ]
, Para
[ Str "line"
, Space
, Str "one"
, LineBreak
, Str "line"
, Space
, Str "two"
]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidthDefault ) ]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Header" ] ]
]
])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "cell" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
]