A module providing a function to execute the Pandoc document converter.
Members
(inner, constant) defaults :PandocAdapterOptions
Default configuration for the pandoc function.
Type:
- PandocAdapterOptions
Methods
(async, static) pandoc(config) → {Promise.<string>}
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
object | Configuration object for the pandoc execution. Properties
|
Throws:
-
Rejects with an error if the Pandoc binary fails and
allowErrors
orallowStdoutError
are false. - Type
- Error | string
Returns:
A Promise that resolves with the stdout from the Pandoc binary.
- Type
- Promise.<string>
Type Definitions
PandocAdapterOptions
Properties:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
allowError |
boolean |
<optional> |
false
|
If true, resolves the promise with the stdout even on Pandoc process error. |
||||||||||
allowStdoutError |
boolean |
<optional> |
false
|
If true, resolves with the stdout even if Pandoc writes to stderr. |
||||||||||
execFile |
object |
<optional> |
Options passed directly to the Properties
|
Type:
- object