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

Conversation

Projects
None yet
2 participants
@ddfreyne
Member

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

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 7, 2015

Member

CC @nanoc/contributors — would like a +1

Member

ddfreyne commented Mar 7, 2015

CC @nanoc/contributors — would like a +1

@ghiknt

This comment has been minimized.

Show comment
Hide comment
@ghiknt

ghiknt Mar 7, 2015

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

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?

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 7, 2015

Member

Leaving a comment that says :+1: works!

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

Member

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.

@ghiknt

This comment has been minimized.

Show comment
Hide comment
@ghiknt

ghiknt commented Mar 7, 2015

👍

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 7, 2015

Member

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?

Member

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?

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne
Member

ddfreyne commented Mar 7, 2015

screen shot 2015-03-07 at 16 34 16

@ghiknt

This comment has been minimized.

Show comment
Hide comment
@ghiknt

ghiknt 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.

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.

ddfreyne added a commit that referenced this pull request Mar 7, 2015

Merge pull request #535 from nanoc/generic-pandoc-options
Allow generic Pandoc options with :args

@ddfreyne ddfreyne merged commit a06c5f6 into release-3.7.x Mar 7, 2015

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@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