Text runs were read as plain text, so their formatting and hyperlinks were lost. Runs and fields now keep their bold and italic (`b`, `i`) and their baseline shift (`baseline`, as superscript or subscript). Adjacent runs with the same format are joined first, so two bold runs make one Strong, and spaces at the edges of a formatted run are kept outside it. A run with a hyperlink (`a:hlinkClick`) becomes a Link to the target of its relationship; adjacent runs with the same relationship make one link. Links that act within the presentation, such as a jump to another slide, carry an `action` and are read as plain text. Formatting in slide titles, table cells and SmartArt, which are read as plain text, is still ignored, as is underline. The test fixture was written with python-pptx 1.0.2. Contributed by @nachogarcia.
66 lines
1.2 KiB
Plaintext
66 lines
1.2 KiB
Plaintext
Pandoc
|
|
Meta { unMeta = fromList [] }
|
|
[ Header 2 ( "slide-1" , [] , [] ) [ Str "Formatting" ]
|
|
, Para
|
|
[ Str "A"
|
|
, Space
|
|
, Strong [ Str "bold" , Space , Str "word" ]
|
|
, Space
|
|
, Str "and"
|
|
, Space
|
|
, Str "an"
|
|
, Space
|
|
, Emph [ Str "italic" ]
|
|
, Space
|
|
, Str "one,"
|
|
, Space
|
|
, Str "not"
|
|
, Space
|
|
, Str "bold"
|
|
, Space
|
|
, Str "and"
|
|
, Space
|
|
, Str "mid"
|
|
, Strong [ Str "word" ]
|
|
]
|
|
, Para
|
|
[ Str "Area"
|
|
, Space
|
|
, Str "in"
|
|
, Space
|
|
, Str "m"
|
|
, Superscript [ Str "2" ]
|
|
, Str ","
|
|
, Space
|
|
, Str "water"
|
|
, Space
|
|
, Str "is"
|
|
, Space
|
|
, Str "H"
|
|
, Subscript [ Str "2" ]
|
|
, Str "O."
|
|
]
|
|
, Para
|
|
[ Str "See"
|
|
, Space
|
|
, Link
|
|
( "" , [] , [] )
|
|
[ Str "the"
|
|
, Space
|
|
, Str "pandoc"
|
|
, Space
|
|
, Strong [ Str "site" ]
|
|
]
|
|
( "https://pandoc.org" , "" )
|
|
, Space
|
|
, Str "or"
|
|
, Space
|
|
, Link
|
|
( "" , [] , [] )
|
|
[ Str "the" , Space , Str "report" ]
|
|
( "Report%20draft.pdf" , "" )
|
|
, Str "."
|
|
]
|
|
, Para [ Str "Next" , Space , Str "slide" ]
|
|
]
|