aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-21 09:28:16 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-21 09:28:16 -0700
commit66e5f0ff8de0f968d475f5135e0d9362690f2a0a (patch)
treec37ff08095ec90396c5c50e8b64e176fd62fe2be
parent957314143faec08b4687822557dac6ac32216cb9 (diff)
downloadpandoc-66e5f0ff8de0f968d475f5135e0d9362690f2a0a.tar.gz
Docx writer: Use w:br without attributes for line breaks.
We previously added the attribute `type="textWrapping"`, but this causes problems on Word Online. Closes #5377.
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs5
-rw-r--r--test/docx/golden/codeblock.docxbin9882 -> 9868 bytes
-rw-r--r--test/docx/golden/inline_formatting.docxbin9990 -> 9974 bytes
3 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index b9a3d4d7c..a7b9ee621 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -1389,10 +1389,7 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
)
br :: Element
-br = breakElement "textWrapping"
-
-breakElement :: String -> Element
-breakElement kind = mknode "w:r" [] [mknode "w:br" [("w:type",kind)] () ]
+br = mknode "w:r" [] [mknode "w:br" [] ()]
-- Word will insert these footnotes into the settings.xml file
-- (whether or not they're visible in the document). If they're in the
diff --git a/test/docx/golden/codeblock.docx b/test/docx/golden/codeblock.docx
index d549ed20d..97497c49e 100644
--- a/test/docx/golden/codeblock.docx
+++ b/test/docx/golden/codeblock.docx
Binary files differ
diff --git a/test/docx/golden/inline_formatting.docx b/test/docx/golden/inline_formatting.docx
index a1928cbaa..5ae95f32e 100644
--- a/test/docx/golden/inline_formatting.docx
+++ b/test/docx/golden/inline_formatting.docx
Binary files differ