Permalink
Browse files

modify plugins/Subst.hs to make it work with latest version of pandoc

  • Loading branch information...
1 parent 7ef1736 commit 8aff34c9f2149063bffc86b79b25a47f8790c5f5 @tianyicui tianyicui committed Apr 6, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/Subst.hs
View
4 plugins/Subst.hs
@@ -8,7 +8,7 @@ module Subst (plugin) where
import Control.Monad.CatchIO (try)
import Data.FileStore (FileStoreError, retrieve)
-import Text.Pandoc (defaultParserState, readMarkdown)
+import Text.Pandoc (def, readMarkdown)
import Network.Gitit.ContentTransformer (inlinesToString)
import Network.Gitit.Interface
import Network.Gitit.Framework (filestoreFromConfig)
@@ -27,7 +27,7 @@ substituteIntoBlock ((Para [Link ref ("!subst", _)]):xs) =
alt = "'" ++ target ++ "' doesn't exist. Click here to create it."
lnk = Para [Link [txt] (target,alt)]
in (lnk :) `fmap` substituteIntoBlock xs
- Right a -> let (Pandoc _ content) = readMarkdown defaultParserState a
+ Right a -> let (Pandoc _ content) = readMarkdown def a
in (content ++) `fmap` substituteIntoBlock xs
substituteIntoBlock (x:xs) = (x:) `fmap` substituteIntoBlock xs
substituteIntoBlock [] = return []

0 comments on commit 8aff34c

Please sign in to comment.