From f14ff27bd8be349114b46cc08ed88f0fbbc7ace2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 19 Nov 2022 11:25:56 -0800 Subject: Docx writer: render Span with class `mark` as highlighted. Currently yellow is hardcoded. Maybe think about using a style. See #7743. --- src/Text/Pandoc/Writers/Docx.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 9abe04b7a..3da9a000f 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1114,6 +1114,9 @@ inlineToOpenXML' _ (Str str) = map Elem <$> formattedString str inlineToOpenXML' opts Space = inlineToOpenXML opts (Str " ") inlineToOpenXML' opts SoftBreak = inlineToOpenXML opts (Str " ") +inlineToOpenXML' opts (Span ("",["mark"],[]) ils) = + withTextProp (mknode "w:highlight" [("w:val","yellow")] ()) $ + inlinesToOpenXML opts ils inlineToOpenXML' opts (Span ("",["csl-block"],[]) ils) = inlinesToOpenXML opts ils inlineToOpenXML' opts (Span ("",["csl-left-margin"],[]) ils) = -- cgit v1.2.3