diff --git a/.gitignore b/.gitignore index b60573f0..bbedae6a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ static-build .stack-work .cabal-sandbox .pandoc-* +pandoc +cabal.project.local dist dist-newstyle cabal.sandbox.config diff --git a/package.yaml b/package.yaml index 6730ff44..761bd30a 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: pandoc-crossref -version: '0.3.4.2' +version: '0.3.5.0' synopsis: Pandoc filter for cross-references description: pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them. @@ -18,7 +18,7 @@ data-files: - test/m2m/*/* dependencies: - base >=4.11 && <5 -- pandoc >=2.3 && < 2.8 +- pandoc >=2.8 && < 2.9 - pandoc-types >=1.17.5.1 && < 1.18 - mtl >=1.1 && <2.3 - containers >=0.1 && <0.7 diff --git a/pandoc-crossref.cabal b/pandoc-crossref.cabal index 87ef6e50..8b894cce 100644 --- a/pandoc-crossref.cabal +++ b/pandoc-crossref.cabal @@ -4,10 +4,10 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: edd11ea020cd9236b745c8aa8d2a9728ac41f337c5648fc1d98b28e62e7f4584 +-- hash: 2f4fe34cf2805278f96d96410f404e425f98f053031b5adcd73f25e2e16eb715 name: pandoc-crossref -version: 0.3.4.2 +version: 0.3.5.0 synopsis: Pandoc filter for cross-references description: pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them. category: Text @@ -104,7 +104,7 @@ library , directory >=1 && <1.4 , filepath >=1.1 && <1.5 , mtl >=1.1 && <2.3 - , pandoc >=2.3 && <2.8 + , pandoc >=2.8 && <2.9 , pandoc-types >=1.17.5.1 && <1.18 , roman-numerals ==0.5.* , syb >=0.4 && <0.8 @@ -135,7 +135,7 @@ executable pandoc-crossref , mtl >=1.1 && <2.3 , open-browser >=0.2 && <0.3 , optparse-applicative >=0.13 && <0.16 - , pandoc >=2.3 && <2.8 + , pandoc >=2.8 && <2.9 , pandoc-crossref , pandoc-types >=1.17.5.1 && <1.18 , roman-numerals ==0.5.* @@ -163,7 +163,7 @@ test-suite test-integrative , filepath >=1.1 && <1.5 , hspec >=2.4.4 && <3 , mtl >=1.1 && <2.3 - , pandoc >=2.3 && <2.8 + , pandoc >=2.8 && <2.9 , pandoc-crossref , pandoc-types >=1.17.5.1 && <1.18 , roman-numerals ==0.5.* @@ -212,7 +212,7 @@ test-suite test-pandoc-crossref , filepath >=1.1 && <1.5 , hspec >=2.4.4 && <3 , mtl >=1.1 && <2.3 - , pandoc >=2.3 && <2.8 + , pandoc >=2.8 && <2.9 , pandoc-types >=1.17.5.1 && <1.18 , roman-numerals ==0.5.* , syb >=0.4 && <0.8 diff --git a/src/ManData.hs b/src/ManData.hs index 6ec18350..d930dc24 100644 --- a/src/ManData.hs +++ b/src/ManData.hs @@ -25,6 +25,7 @@ import Language.Haskell.TH.Syntax import qualified Data.Text as T import System.IO import qualified Text.Pandoc as P +import qualified Text.Pandoc.Templates as PT import Control.DeepSeq import Data.String import Text.Pandoc.Highlighting (pygments) @@ -59,8 +60,9 @@ embedManualText = embedManual $ P.writePlain P.def embedManualHtml :: Q Exp embedManualHtml = do t <- runIO $ fmap (either (error . show) id) $ P.runIO $ P.getDefaultTemplate "html5" + tt <- runIO $ either (error . show) id <$> PT.compileTemplate "html5.txt" t embedManual $ P.writeHtml5String P.def{ - P.writerTemplate = Just t + P.writerTemplate = Just tt , P.writerHighlightStyle = Just pygments } diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index c2568592..00000000 --- a/stack.yaml +++ /dev/null @@ -1,11 +0,0 @@ -flags: - pandoc-crossref: - enable_flaky_tests: true -ghc-options: - $targets: -Werror -optl-fuse-ld=bfd -packages: -- . -allow-newer: false -extra-deps: -- roman-numerals-0.5.1.5 -resolver: nightly-2019-03-07