diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index ec7105a07..23a1f7655 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -660,8 +660,12 @@ inlineToOpenDocument o ils , ("xlink:show" , "embed" ) , ("xlink:actuate", "onLoad")] mkSpan attr xs = do - let (ident,_,_) = attr - i = withLangFromAttr attr (inlinesToOpenDocument o xs) + let (ident,_,kvs) = attr + i = maybe id (\sty -> + fmap (inTags False "text:span" + [ ("text:style-name", sty) ])) + (lookup "custom-style" kvs) . + withLangFromAttr attr $ inlinesToOpenDocument o xs mkBookmarkedSpan b = if isEmpty b then selfClosingBookmark ident diff --git a/test/command/9657.md b/test/command/9657.md new file mode 100644 index 000000000..a3da54b46 --- /dev/null +++ b/test/command/9657.md @@ -0,0 +1,7 @@ +``` +% pandoc -t opendocument +[Text here]{custom-style="Strikethrough"} +^D +Text +here +```