From 90e436d49604e3fd1ef9432fb23f6d7f6245c7fd Mon Sep 17 00:00:00 2001
From: despresc <christian.j.j.despres@gmail.com>
Date: Mon, 4 Nov 2019 16:12:37 -0500
Subject: Switch to new pandoc-types and use Text instead of String [API
 change].

PR #5884.

+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
  were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
  `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
  `mantyUntilChar` have been added: these are like their
  unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
  to be intended as an interface to Glob, which uses strings.
  It seems to be used only once in the package, in the EPUB writer,
  so that is not hard to change.
---
 src/Text/Pandoc/Writers/Docx/StyleMap.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/Text/Pandoc/Writers/Docx/StyleMap.hs')

diff --git a/src/Text/Pandoc/Writers/Docx/StyleMap.hs b/src/Text/Pandoc/Writers/Docx/StyleMap.hs
index 4f0b0c3f9..18956ee52 100644
--- a/src/Text/Pandoc/Writers/Docx/StyleMap.hs
+++ b/src/Text/Pandoc/Writers/Docx/StyleMap.hs
@@ -27,6 +27,7 @@ module Text.Pandoc.Writers.Docx.StyleMap ( StyleMaps(..)
 import Text.Pandoc.Readers.Docx.Parse.Styles
 import Codec.Archive.Zip
 import qualified Data.Map as M
+import qualified Data.Text as T
 import Data.String
 import Data.Char (isSpace)
 import Prelude
@@ -38,7 +39,7 @@ type CharStyleNameMap = M.Map CharStyleName CharStyle
 getStyleIdFromName :: (Ord sn, FromStyleName sn, IsString (StyleId sty), HasStyleId sty)
                    => sn -> M.Map sn sty -> StyleId sty
 getStyleIdFromName s = maybe (fallback s) getStyleId . M.lookup s
-  where fallback = fromString . filter (not . isSpace) . fromStyleName
+  where fallback = fromString . T.unpack . T.filter (not . isSpace) . fromStyleName
 
 hasStyleName :: (Ord sn, HasStyleId sty)
              => sn -> M.Map sn sty -> Bool
-- 
cgit v1.2.3