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 specifying pandoc options, e.g. --standalone --mathjax #4

Open
cben opened this issue Aug 11, 2015 · 1 comment
Open

Allow specifying pandoc options, e.g. --standalone --mathjax #4

cben opened this issue Aug 11, 2015 · 1 comment

Comments

@cben
Copy link

cben commented Aug 11, 2015

Nice project! Added to pandoc wiki
I was happy to discover you already allow pandoc syntax extensions e.g. text/markdown_github-blank_before_header+tex_math_dollars+tex_math_single_backslash :-)
But many aspects of pandoc's input and output are not covered by "from" and "to" formats, so I'd like to also be able to pass extra command-line options.

Allowing arbitrary command line options is probably unsafe (multiple ways to read local files like /etc/passwd, filters might allow remote code execution...).
I don't see an easy way to know what's secure, except by whitelist (to be extended by PRs when people want more).
And instead of trying to parse a given command line, it's simpler to accept structured options (e.g. {standalone: true} or &standalone=true) and generate a command line.
=> All this leads to inventing yet another complex pandoc API, that won't 1:1 match other pandoc service APIs... Oh well. Prior arts: http://www.docverter.com/api#Full-Option-Reference, http://yihui.name/knitr/demo/pandoc/ (see Config File), https://github.com/alphabetum/pandoc-ruby#usage

@nichtich
Copy link

I'd choose to implement options equal to docverter because its a web api as well and pandoc-as-a-service can be used as open source alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants