From 395ea03069167568f8fccb018c794bd43a787b94 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 13 Jan 2019 07:56:55 -0800 Subject: Support ipynb (Jupyter notebook) as input and output format. [API change] * Depend on ipynb library. * Add `ipynb` as input and output format. * Added Text.Pandoc.Readers.Ipynb (supports both nbformat v3 and v4). * Added Text.Pandoc.Writers.Ipynb (supports nbformat v4). * Added ipynb readers and writers to T.P.Readers, T.P.Writers, and T.P.Extensions. Register the file extension .ipynb for this format. * Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error. * Note: there is no template for ipynb. --- src/Text/Pandoc/App/FormatHeuristics.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Text/Pandoc/App') diff --git a/src/Text/Pandoc/App/FormatHeuristics.hs b/src/Text/Pandoc/App/FormatHeuristics.hs index c8dbcd645..723c5d894 100644 --- a/src/Text/Pandoc/App/FormatHeuristics.hs +++ b/src/Text/Pandoc/App/FormatHeuristics.hs @@ -90,5 +90,6 @@ formatFromFilePath x = ".txt" -> Just "markdown" ".wiki" -> Just "mediawiki" ".xhtml" -> Just "html" + ".ipynb" -> Just "ipynb" ['.',y] | y `elem` ['1'..'9'] -> Just "man" _ -> Nothing -- cgit v1.2.3