git.iko.soy/typeable/pandoc
on master help sign in
make-pandoc-man-pages: fixed to build with new readMarkdown type.
commit978ae55b2299f9c2bb186e753c2d89971350c83d authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 28 Mar 2015, 15:36 (12 years ago) parent07cc007
1 file changed+2−2
man/make-pandoc-man-pages.hs+2−2
man/make-pandoc-man-pages.hs+2−2
@@ -1,6 +1,7 @@
11{-# LANGUAGE CPP #-}
22-- Create pandoc.1 man and pandoc_markdown.5 man pages from README
33import Text.Pandoc
4+import Text.Pandoc.Error (handleError)
45import qualified Text.Pandoc.UTF8 as UTF8
56import Data.Char (toUpper)
67import Control.Monad
@@ -27,7 +28,7 @@ main = do
2728
2829 unless (null ds1 && null ds2) $ do
2930 rmContents <- UTF8.readFile "README"
30− let (Pandoc meta blocks) = normalize $ readMarkdown def rmContents
31+ let (Pandoc meta blocks) = normalize $ handleError $ readMarkdown def rmContents
3132 let manBlocks = removeSect [Str "Wrappers"]
3233 $ removeSect [Str "Pandoc's",Space,Str "markdown"] blocks
3334 let syntaxBlocks = extractSect [Str "Pandoc's",Space,Str "markdown"] blocks
@@ -101,4 +102,3 @@ modifiedDependencies file dependencies = do
101102 depModTimes <- mapM getModificationTime dependencies
102103 let modified = zipWith (\dep time -> if time > fileModTime then Just dep else Nothing) dependencies depModTimes
103104 return $ catMaybes modified
104−