diff options
| author | John MacFarlane <[email protected]> | 2023-08-06 11:09:04 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-08-06 11:09:04 -0700 |
| commit | d3f8f50264d3d9aa4fd90b3b559f5a7e6ec7ce3d (patch) | |
| tree | c56f2d8904ddeff8629347b39f3027897d0909e3 /src/Text | |
| parent | c861e12d1681222739e95dd71ba2dc0822bf2aa1 (diff) | |
ODT writer: Use a style for Highlighted, so color can be adjusted.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Writers/OpenDocument.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index ce32c9f54..5f17ce7a2 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -609,7 +609,8 @@ inlineToOpenDocument o ils -> return $ preformatted "\n" | otherwise -> return space Span ("", ["mark"], []) xs -> - withTextStyle Highlight $ inlinesToOpenDocument o xs + inTags False "text:span" [("text:style-name","Highlighted")] <$> + inlinesToOpenDocument o xs Span attr xs -> mkSpan attr xs LineBreak -> return $ selfClosingTag "text:line-break" [] Str s -> return $ handleSpaces $ escapeStringForXML s @@ -884,7 +885,6 @@ data TextStyle = Italic | Sup | SmallC | Pre - | Highlight | Language Lang deriving ( Eq,Ord ) @@ -905,7 +905,6 @@ textStyleAttr m = \case Sub -> Map.insert "style:text-position" "sub 58%" m Sup -> Map.insert "style:text-position" "super 58%" m SmallC -> Map.insert "fo:font-variant" "small-caps" m - Highlight -> Map.insert "fo:background-color" "#ffff38" m Pre -> Map.insert "style:font-name" "Courier New" . Map.insert "style:font-name-asian" "Courier New" . Map.insert "style:font-name-complex" "Courier New" $ m |
