0.1.0 • Published 6 years ago

pandoc-filter-promisified v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

About

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

Install

npm install -g pandoc-filter-promisified

Example

#!/usr/bin/env node

// Pandoc filter to convert all text to uppercase

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

async function action(elt,format,meta) {
	if (elt.t === 'Str') return Str(elt.c.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.

Thanks to Mike Henderson for the original version of pandoc-filter for Node.

License

MIT