Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Pandoc 3.2.x and Pandoc API 1.23.1 #248

Open
mfhepp opened this issue Jul 25, 2024 · 0 comments
Open

Support for Pandoc 3.2.x and Pandoc API 1.23.1 #248

mfhepp opened this issue Jul 25, 2024 · 0 comments

Comments

@mfhepp
Copy link

mfhepp commented Jul 25, 2024

Starting with Pandoc 3.1.6.1, the compatible version of the Pandoc API (on Hackage: pandoc-types has changed to 1.23.0.1 and later to 1.23.1 (latest).

It would be great if you (or somebody else via a PR) could update Panflute so that it becomes usable with Pandoc 3.2!

Your work is very much appreciated, btw!

As my small contribution: I looked into what changed in pandoc-types from 1.23.0: Besides updating the GHC, CI/CD components, and allowing bytestring 0.12, the only changes that may affect Panflute are IMHO these two:

jgm/pandoc-types@1d0e8b2

src/Text/Pandoc/JSON.hs

instance (Walkable [a] Pandoc, MonadIO m) => ToJSONFilter m (a -> [a]) where
  toJSONFilter f = liftIO $ BL.getContents >>=
    BL.putStr . encode . (walk (concatMap f) :: Pandoc -> Pandoc) .
    either error id .
    eitherDecode'

src/Text/Pandoc/JSON.hs

- instance (Walkable a Pandoc) => ToJSONFilter IO (a -> a) where
-  toJSONFilter f = BL.getContents >>=
+ instance (Walkable a Pandoc, MonadIO m) => ToJSONFilter m (a -> a) where
+  toJSONFilter f = liftIO $ BL.getContents >>=
+    BL.putStr . encode . (walk f :: Pandoc -> Pandoc) . either error id .
+    eitherDecode'

jgm/pandoc-types@01b2b86

The snippet from the changelog is below.

[1.23.1]

[1.23.0.1]

  • Allow aeson 2.2.

  • Remove dependency on string-qq (recbecca skinner).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant