owickstrom / pandoc-include-code

A Pandoc filter for including code from source files
Mozilla Public License 2.0
141 stars 17 forks source link

Support pandoc 3.0 #46

Open chenrui333 opened 1 year ago

chenrui333 commented 1 year ago

While trying to upgrade pandoc 3.0 formula, I ran into some regression test failure.

  ==> /opt/homebrew/opt/pandoc/bin/pandoc -F /opt/homebrew/Cellar/pandoc-include-code/1.5.0.0_2/bin/pandoc-include-code -o out.html hello.md
  pandoc-include-code: Error in $: Incompatible API versions: encoded with [1,23] but attempted to decode with [1,22].
  CallStack (from HasCallStack):
    error, called at src/Text/Pandoc/JSON.hs:112:48 in pndc-typs-1.22-04178467:Text.Pandoc.JSON
  Error running filter /opt/homebrew/Cellar/pandoc-include-code/1.5.0.0_2/bin/pandoc-include-code:
  Filter returned error status 1
  ==> Testing pandoc-include-code (again)
  ==> /opt/homebrew/opt/pandoc/bin/pandoc -F /opt/homebrew/Cellar/pandoc-include-code/1.5.0.0_2/bin/pandoc-include-code -o out.html hello.md
  pandoc-include-code: Error in $: Incompatible API versions: encoded with [1,23] but attempted to decode with [1,22].
  CallStack (from HasCallStack):
    error, called at src/Text/Pandoc/JSON.hs:112:48 in pndc-typs-1.22-04178467:Text.Pandoc.JSON
  Error running filter /opt/homebrew/Cellar/pandoc-include-code/1.5.0.0_2/bin/pandoc-include-code:
  Filter returned error status 1
  Error: pandoc-include-code: failed
chenrui333 commented 1 year ago

@LaurentRDC can you also help this ticket? Thanks! 🙏

iandol commented 1 year ago

@owickstrom -- is this tool still supported, as I notice several build issues due to pandoc incompatibilities. Because this has a pandoc dependency, it unfortunately blocks all homebrew users from upgrading to a new Pandoc version...

chenrui333 commented 1 year ago

@LaurentRDC any time to fix the API compatibility issues?

LaurentRDC commented 1 year ago

I'm sorry, I don't have time to get involved right now

everythingfunctional commented 1 year ago

I just wanted to +1 this in hopes of eventual resolution. I'm trying to make use of it in an open source journal publication workflow: https://github.com/fortran-lang/fortran-forum-article-template

owickstrom commented 1 year ago

I'm also unable to put in the work at this moment. But if someone can put together a PR, I'll try to get it through.

veneres commented 1 year ago

Hi everybody! Yesterday, since this repo seems no longer supported, I started writing a replacement in Python for this awesome filter for Pandoc: https://github.com/veneres/py-pandoc-include-code For the moment, I have only written something quick to make it work in my use case, and it seems to be sufficient. Feel free to contribute or to suggest what to include. Anyway, thank you @owickstrom for having supported this project for a long time!