diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-03-06 10:00:18 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-03-06 10:00:18 -0800 |
commit | 707eef34b74e64174ca0af3373a04176b7860f18 (patch) | |
tree | a4a837a9eafc0d3822324f20f23e4f8034a265a7 /src/Text/Pandoc | |
parent | 186b50e26383ad89132f0bf7630d1c8b924ca04e (diff) | |
download | pandoc-707eef34b74e64174ca0af3373a04176b7860f18.tar.gz |
Shared.filterIpynbOutput: 'best' should include everything for ipynb.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 215fbfde1..0e1c115ee 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -679,7 +679,11 @@ filterIpynbOutput mode = walk go where go (Div (ident, ("output":os), kvs) bs) = case mode of Nothing -> Div (ident, ("output":os), kvs) [] - Just fmt -> Div (ident, ("output":os), kvs) $ + -- "best" for ipynb includes all formats: + Just fmt + | fmt == Format "ipynb" + -> Div (ident, ("output":os), kvs) bs + | otherwise -> Div (ident, ("output":os), kvs) $ take 1 $ sortBy (comparing rank) bs where rank (RawBlock (Format "html") _) |