aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docx.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-23 17:31:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-12-23 18:07:49 -0700
commit9d781b145449933369a02145eeb18cc2857480ed (patch)
treebadd31c411b28de1485f3b7f2c38840e8aec37e9 /src/Text/Pandoc/Writers/Docx.hs
parentbfb6b61084ab6046db2105ebb42935543ee4d528 (diff)
downloadpandoc-9d781b145449933369a02145eeb18cc2857480ed.tar.gz
Updates to use skylighting rather than highlighting-kate.
So far this just reproduces capacity. Later we'll be able to add features like warning messages, dynamic loading of xml syntax definitions, and dynamic loading of themes.
Diffstat (limited to 'src/Text/Pandoc/Writers/Docx.hs')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index a8f82c0ec..3fc5d22a2 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -49,19 +49,19 @@ import Text.Pandoc.Options
import Text.Pandoc.Readers.TeXMath
import Text.Pandoc.Highlighting ( highlight )
import Text.Pandoc.Walk
-import Text.Highlighting.Kate.Types ()
import Text.XML.Light as XML
import Text.TeXMath
import Text.Pandoc.Readers.Docx.StyleMap
import Text.Pandoc.Readers.Docx.Util (elemName)
import Control.Monad.Reader
import Control.Monad.State
-import Text.Highlighting.Kate
+import Skylighting
import Data.Unique (hashUnique, newUnique)
import System.Random (randomRIO)
import Text.Printf (printf)
import qualified Control.Exception as E
import Data.Monoid ((<>))
+import qualified Data.Text as T
import Text.Pandoc.MIME (MimeType, getMimeType, getMimeTypeDef,
extensionFromMimeType)
import Control.Applicative ((<|>))
@@ -1127,7 +1127,7 @@ inlineToOpenXML' opts (Code attrs str) = do
toHlTok (toktype,tok) = mknode "w:r" []
[ mknode "w:rPr" []
[ rCustomStyle (show toktype) ]
- , mknode "w:t" [("xml:space","preserve")] tok ]
+ , mknode "w:t" [("xml:space","preserve")] (T.unpack tok) ]
withTextProp (rCustomStyle "VerbatimChar")
$ if writerHighlight opts
then case highlight formatOpenXML attrs str of