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

Allow generic Pandoc options with :args #535

Merged
merged 2 commits into from Mar 7, 2015
Merged

Conversation

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Feb 21, 2015

Potential fix for #526.

It is now possible to call Pandoc like this:

filter :pandoc, args: [:s, {:f => :markdown, :to => :html}, 'no-wrap', :toc]

I don’t think this breaks backwards compatibility, even though the filter’s method signature has changed, because it was never possible to call the filter in a different way.

CC @ghiknt

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Mar 7, 2015

CC @nanoc/contributors — would like a +1

Loading

@ghiknt
Copy link

@ghiknt ghiknt commented Mar 7, 2015

Gladly. I have manually patched against 3.7.5 using your diff and it works great. Where do I +1?

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Mar 7, 2015

Leaving a comment that says :+1: works!

I just realised that the documentation isn’t up-to-date. Will fix now.

Loading

@ghiknt
Copy link

@ghiknt ghiknt commented Mar 7, 2015

👍

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Mar 7, 2015

The documentation is now updated. I’ve marked the :args approach as recommended, since it’s the most flexible and matches closely the way one would invoke Pandoc from the command line.

Are you OK with the documentation?

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Mar 7, 2015

screen shot 2015-03-07 at 16 34 16

Loading

@ghiknt
Copy link

@ghiknt ghiknt commented Mar 7, 2015

Looks good to me. My test/use case is:

opts = [{:to => :html5,
        'base-header-level' => 2,
        :filter => 'pandoc-citeproc',
        'data-dir' => 'content/about/bibliography/',
        :bibliography => 'content/about/bibliography/whk.name.bib',
        :csl => 'content/about/bibliography/chicago-annotated-bibliography.csl'
       }, 'section-divs']
filter :pandoc, :args => opts  

Which I would have been able to develop from the new docs.

Loading

ddfreyne added a commit that referenced this issue Mar 7, 2015
Allow generic Pandoc options with :args
@ddfreyne ddfreyne merged commit a06c5f6 into release-3.7.x Mar 7, 2015
0 of 2 checks passed
Loading
@ddfreyne ddfreyne deleted the generic-pandoc-options branch Mar 7, 2015
@ddfreyne ddfreyne removed the to review label Mar 7, 2015
@ddfreyne ddfreyne added this to the 3.7.6 milestone Apr 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants