Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

merged 1 commit into from

4 participants


No description provided.


@tianyicui Thanks for your contributions. Nevertheless this pull request is not very informative; would you please add which version of pandoc does not work with gitit, and with what version your patch adds compatibility? Remember that issues might be read by other people a few months later.


thanks for this @tianyicui ; i was about to report this as a bug.

@nomeata Pandoc.Text no longer exposes the function 'defaultParserState'; i can't find when this change was made, but it doesn't matter that much, as the current version of Subst.hs just simply doesn't work with say pandoc-

this pull request should be accepted.

@jgm jgm merged commit 92d05d0 into jgm:master
@silky silky referenced this pull request in nomeata/random-haskell-code

this doesn't compile output that it produces when run on itself #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/Subst.hs
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 []
Something went wrong with that request. Please try again.