Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/nbconvert/filters/pandoc.py: 67%
3 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 06:10 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 06:10 +0000
1"""Convert between any two formats using pandoc."""
2from nbconvert.utils.pandoc import pandoc
5def convert_pandoc(source, from_format, to_format, extra_args=None):
6 """Convert between any two formats using pandoc.
8 This function will raise an error if pandoc is not installed.
9 Any error messages generated by pandoc are printed to stderr.
11 Parameters
12 ----------
13 source : string
14 Input string, assumed to be valid in from_format.
15 from_format : string
16 Pandoc format of source.
17 to_format : string
18 Pandoc format for output.
20 Returns
21 -------
22 out : string
23 Output as returned by pandoc.
24 """
25 return pandoc(source, from_format, to_format, extra_args=extra_args)