@@ -1,4 +1,3 @@
2{-# LANGUAGE PatternGuards #-}
1{-# LANGUAGE PatternGuards #-}
3{-# LANGUAGE RankNTypes #-}
2{-# LANGUAGE RankNTypes #-}
4{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
@@ -65,7 +64,7 @@ import Text.Pandoc.Readers.Docx.StyleMap
65import Text.Pandoc.Shared hiding (Element)
64import Text.Pandoc.Shared hiding (Element)
66import Text.Pandoc.Walk
65import Text.Pandoc.Walk
67import Text.Pandoc.Writers.Math
66import Text.Pandoc.Writers.Math
68−import Text.Pandoc.Writers.Shared (fixDisplayMath)
67+import Text.Pandoc.Writers.Shared (fixDisplayMath, metaValueToInlines)
69import Text.Printf (printf)
68import Text.Printf (printf)
70import Text.TeXMath
69import Text.TeXMath
71import Text.XML.Light as XML
70import Text.XML.Light as XML
@@ -196,15 +195,6 @@ isValidChar (ord -> c)
196 | 0x10000 <= c && c <= 0x10FFFF = True
195 | 0x10000 <= c && c <= 0x10FFFF = True
197 | otherwise = False
196 | otherwise = False
199−metaValueToInlines :: MetaValue -> [Inline]
200−metaValueToInlines (MetaString s) = [Str s]
201−metaValueToInlines (MetaInlines ils) = ils
202−metaValueToInlines (MetaBlocks bs) = query return bs
203−metaValueToInlines (MetaBool b) = [Str $ show b]
204−metaValueToInlines _ = []
208writeDocx :: (PandocMonad m)
198writeDocx :: (PandocMonad m)
209 => WriterOptions -- ^ Writer options
199 => WriterOptions -- ^ Writer options
210 -> Pandoc -- ^ Document to convert
200 -> Pandoc -- ^ Document to convert