diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-05-08 10:17:51 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-05-08 10:17:51 -0700 |
commit | 40603dd4cd80f633239d1f48da3c3c834412b02e (patch) | |
tree | 1cdfc282641df1e5f4dc349c1420d6f343a4f32c /src/Text/Pandoc | |
parent | 780bf64d1d441caf98c29f0544c1eefdb81b1cfa (diff) | |
download | pandoc-40603dd4cd80f633239d1f48da3c3c834412b02e.tar.gz |
Support underline in docx writer.
Updated golden test and confirmed validity of file.
Closes #4633.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 3 |
1 files changed, 3 insertions, 0 deletions
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. |