mfenner / jekyll-pandoc

Jekyll Pandoc markdown converter as Ruby gem
MIT License
82 stars 10 forks source link

Pandoc has changed the --smart option #11

Open jbrains opened 6 years ago

jbrains commented 6 years ago

Pandoc 2.0.1 (or earlier?) has replaced the --smart option with (for example) markdown+smart. This plugin doesn't work with Pandoc 2.0.1, because it still specifies the command-line option --smart.

owickstrom commented 6 years ago

I'm using Pandoc 1.19.2.1 and I was also missing the smart quotes (I'm guessing that's your problem?)

Adding smart to the _config.yml worked for me:

pandoc:
  extensions:
    smart: ''
    # other extensions...

If the extension is removed in 2.x then it might not work, but I thought it might be worth a try.

jbrains commented 6 years ago

That's not my problem. The pandoc command fails with Pandoc 2.0.1, because --smart is no longer a valid option.

owickstrom commented 6 years ago

All right.

tlnagy commented 6 years ago

I'm also running into this, I think https://github.com/mfenner/jekyll-pandoc/blob/9143c2071f3d62d5e678d8622afe90af06bdac73/spec/pandoc_spec.rb#L5 is the guilty line since it refers to smart, which has been deprecated. @mfenner any thoughts? This is just the tests. It looks like the problem might be upstream in pandoc-ruby

ayazhafiz commented 6 years ago

Any movement on this?

ketozhang commented 6 years ago

Bump, how many times am I going to run into a dead plugin or dead theme ☹️ . @mfenner Like @tlnagy said that line should be the issue. Would try to remove "smart" or does it have to do with pandoc-ruby?

I did get the pandoc working but unfortunately by commenting out everything except mathjax in _config.yml:

pandoc:
  extensions:
    - mathjax
    # - normalize
    # - smart
    # - csl: _styles/apa.csl
    # - bibliography: bibliography/references.bib
tlnagy commented 6 years ago

I finally got around to looking at this again and I realized (how did I miss this originally?) that this library mostly just dispatches to pandoc-ruby which is a simple wrapper of pandoc so the problems I had could only have been with my _config.yml. Lo and behold, I had forgotten to remove the normalize and smart options. So this now works for me with pandoc 2.1.1

markdown: Pandoc
pandoc:
  extensions:
    - mathjax
    - bibliography: bibliography.bib