Skip to content
Browse files

Fix highlighting in exports.

Closes #356.
  • Loading branch information...
1 parent eda6e08 commit 7ef1736e1df8b235dfbc9b79e90cecc58a28637c John MacFarlane committed Mar 25, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 Network/Gitit/Export.hs
View
6 Network/Gitit/Export.hs
@@ -49,6 +49,7 @@ import Text.HTML.SanitizeXSS
import Text.Pandoc.Writers.RTF (writeRTFWithEmbeddedImages)
import qualified Data.Text as T
import Data.List (isPrefixOf)
+import Text.Highlighting.Kate (styleToCss, pygments)
import Paths_gitit (getDataFileName)
defaultRespOptions :: WriterOptions
@@ -132,7 +133,7 @@ respondSlides templ slideVariant page doc = do
else return ""
let h = writeHtmlString opts'{
writerVariables =
- ("body",body''):("dzslides-core",dzcore):variables'
+ ("body",body''):("dzslides-core",dzcore):("highlighting-css",pygmentsCss):variables'
,writerTemplate = template
,writerSourceDirectory = repositoryPath cfg
,writerUserDataDir = pandocUserData cfg
@@ -321,3 +322,6 @@ exportFormats cfg = if pdfExport cfg
, ("ODT", respondODT)
, ("Docx", respondDocx)
, ("RTF", respondRTF) ]
+
+pygmentsCss :: String
+pygmentsCss = styleToCss pygments

0 comments on commit 7ef1736

Please sign in to comment.
Something went wrong with that request. Please try again.