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 older and newer versions of Pandoc #63
Comments
Thanks for opening the issue, I will look into this shortly. |
@cderv how would you go about this in Rmd? |
Usually we do a conditional with 1.19.2.4 is quite old and is a pre Pandoc 2.0 version. Lots of recent feature does not work with it for example. How are you using Pandoc ? Are you calling Pandoc directly ? Are you using rmarkdown ? |
It’s just knitting an Rmd from ./inst (similar idea how reprex works) |
Oh ok. So you should not deal with that yourself in covrpage - I see Lines 44 to 50 in bafeb19
So this is really about rmarkdown - we may need to update our conditional. Thanks for the report! @agilly what is your rmarkdown version ? Are you using the latest ? |
Quite an old version - A lot of feature of rmarkdown won't work so the output could be quite different than with another version. Anyhow, we were missing a conditional for old version - added in rstudio/rmarkdown@ea9c7c9
I don't know where this comes from. As linked before, we correctly only add
This should not be thrown for Pandoc 2.11.2 from the code shared just above
So those warnings makes me think: Are you sure You should run Also please, do confirm your rmarkdown version. If you have an old one, some conditional could be missing. |
is there any assertion i can add before running the render or is that redundant because it is done internally in |
I would say it should be handled by rmarkdown. You don't activate any specific feature in However, if you test several pandoc version, and notice that the rendering for what is inside your Rmd does not work or look great with old Pandoc, then you could have a minimal requirement. pandoc R package can help you test this. But in rmarkdown we should handle any Pandoc version, and throw error or adapt depending on the pandoc version found, so you should not deal with that if your content does not depend on specific version IMO |
covrpage
calls Pandoc to convert between formats. However, it seems to be tied to a narrow range of versions due to the options it uses.1.19.2.4
it fails becausepandoc: Unknown extension: gfm_auto_identifiers
3.1.6
it fails becauseUnknown option --atx-headers.
This looks like it's caused by pandoc arguments changing with every version. Could it be feasible to extract the pandoc version using e.g.
pandoc --version| head -1| cut -d' ' -f2
and adapting the options according to that?The text was updated successfully, but these errors were encountered: