Skip to content

Commit

Permalink
Remove pandoc-include-code
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed May 8, 2020
1 parent b38ee96 commit d7d98f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log for rib

## UNRELEASED

- Removed pandoc-include-code

## 0.10.0.0

- API
Expand Down
1 change: 0 additions & 1 deletion rib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ common library-common
mtl >=2.2.2 && <2.3,
optparse-applicative >= 0.15,
pandoc >=2.7 && <3,
pandoc-include-code >=1.5 && <1.6,
pandoc-types >=1.20,
relude >= 0.6 && < 0.7,
safe-exceptions,
Expand Down
8 changes: 1 addition & 7 deletions src/Rib/Parser/Pandoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ViewPatterns #-}

-- | Helpers for working with Pandoc documents
module Rib.Parser.Pandoc
Expand Down Expand Up @@ -36,7 +34,6 @@ import Relude
import Rib.Shake (ribInputDir)
import System.FilePath
import Text.Pandoc
import Text.Pandoc.Filter.IncludeCode (includeCode)
import qualified Text.Pandoc.Readers
import Text.Pandoc.Walk (query, walkM)
import Text.Pandoc.Writers.Shared (toTableOfContents)
Expand All @@ -61,10 +58,7 @@ parse textReader f =
inputDir <- ribInputDir
content <- toText <$> readFile' (inputDir </> f)
fmap (first show) $ runExceptT $ do
v' <- runIO' $ textReader readerSettings content
liftIO $ walkM includeSources v'
where
includeSources = includeCode $ Just $ Format "html5"
runIO' $ textReader readerSettings content

-- | Render a Pandoc document to HTML
render :: Monad m => Pandoc -> HtmlT m ()
Expand Down

0 comments on commit d7d98f7

Please sign in to comment.