GithubHelp home page GithubHelp logo

pandoc-filter-node's People

Contributors

dependabot[bot] avatar floedelmann avatar frozenbonito avatar hubgit avatar jedahu avatar mvhenderson avatar noelwelsh avatar phiresky avatar raghur avatar tumidi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pandoc-filter-node's Issues

Promise support?

Hi - thanks for this project.

However, one thing that this lacks right now is support for promises being returned from the action method. Given the async nature in node, this is almost mandatory. I've looked at the tests and they don't have an example either.

Would also be awesome to have an example/test showing async callback code in action - say for example the abc.py sample from the python pandoc filters repo.

Support an action that takes an asynchronous callback

I don't know enough about JavaScript to know whether this is the same issue as #1 (though I suspect it is), but let me describe it anyway :-)

All the examples end with pandoc.stdio(action) where action is a function like:

function action(type, value, format, meta) {
    // ...
    return something;
}

In my case, inside action I need to call a function that takes a callback (as is typical for Node):

function action(type, value, format, meta) {
    // ...
   doAsync(value, function () { ... });
}

So I won't have something to return from inside action.

I am right now trying to hack it out by copying and editing much of the internals of pandoc-filter.
(Specifically, stdio which is an alias for toJSONFilter calls filter which calls walk and it appears I need to hack a copy of that function: https://github.com/mvhenderson/pandoc-filter-node/blob/be9d69ac/index.js#L47,L79 .)

But I imagine this is a common use case, and it would be better if pandoc-filter supported this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.