git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #2255 from mchladek/odt_linebreak

Fix #2254 : OpenDocument writer adds space with hard line break

commitb5d3b4f6089eac5320f08911e435a626f90a389d authorJohn MacFarlane <jgm@berkeley.edu> dateWed 1 Jul 2015, 11:49 (11 years ago) parent8e74700125b0c7
2 files changed+2−3
src/Text/Pandoc/Writers/OpenDocument.hs+1−1 tests/writer.opendocument+1−2
src/Text/Pandoc/Writers/OpenDocument.hs+1−1
@@ -378,7 +378,7 @@ inlineToOpenDocument :: WriterOptions -> Inline -> State WriterState Doc
378378inlineToOpenDocument o ils
379379 | Space <- ils = inTextStyle space
380380 | Span _ xs <- ils = inlinesToOpenDocument o xs
381− | LineBreak <- ils = return $ selfClosingTag "text:line-break" [] <> cr
381+ | LineBreak <- ils = return $ selfClosingTag "text:line-break" []
382382 | Str s <- ils = inTextStyle $ handleSpaces $ escapeStringForXML s
383383 | Emph l <- ils = withTextStyle Italic $ inlinesToOpenDocument o l
384384 | Strong l <- ils = withTextStyle Bold $ inlinesToOpenDocument o l
tests/writer.opendocument+1−2
@@ -896,8 +896,7 @@ of a paragraph looked like a list item.</text:p>
896896<text:p text:style-name="Text_20_body">Here’s one with a bullet. *
897897criminey.</text:p>
898898<text:p text:style-name="Text_20_body">There should be a hard line
899−break<text:line-break />
900−here.</text:p>
899+break<text:line-break />here.</text:p>
901900<text:p text:style-name="Horizontal_20_Line" />
902901<text:h text:style-name="Heading_20_1" text:outline-level="1">Block
903902Quotes</text:h>