From 40603dd4cd80f633239d1f48da3c3c834412b02e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 May 2018 10:17:51 -0700 Subject: Support underline in docx writer. Updated golden test and confirmed validity of file. Closes #4633. --- src/Text/Pandoc/Writers/Docx.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 9b65e6ec7..1666c0562 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1111,6 +1111,9 @@ inlineToOpenXML' _ (Str str) = formattedString str inlineToOpenXML' opts Space = inlineToOpenXML opts (Str " ") inlineToOpenXML' opts SoftBreak = inlineToOpenXML opts (Str " ") +inlineToOpenXML' opts (Span (_,["underline"],_) ils) = do + withTextProp (mknode "w:u" [("w:val","single")] ()) $ + inlinesToOpenXML opts ils inlineToOpenXML' _ (Span (ident,["comment-start"],kvs) ils) = do -- prefer the "id" in kvs, since that is the one produced by the docx -- reader. -- cgit v1.2.3