Pandoc filtering for Node.js
JavaScript
Latest commit be9d69a Oct 27, 2016 Michael Henderson bump to 0.1.6 and updated README
Fixes #5, again.

README.md

About

Node.js port of the Python pandocfilters for filtering with Pandoc

Install

npm install -g pandoc-filter

Example

#!/usr/bin/env node

// Pandoc filter to convert all text to uppercase

var pandoc = require('pandoc-filter');
var Str = pandoc.Str;

function action(type,value,format,meta) {
    if (type === 'Str') return Str(value.toUpperCase());
}

pandoc.stdio(action);

Compatibility Note

v0.1.6 is required for pandoc versions after 1.17.2 to support the new JSON format. See this issue for details.

Credits

Thanks to John MacFarlane for Pandoc.

License

MIT