From a9a9a2c62a811d0e64062b0be628f55ba541dad7 Mon Sep 17 00:00:00 2001 From: Kolen Cheung Date: Fri, 10 Dec 2021 16:18:35 -0800 Subject: fix(IpynbOutput)!: rank always favors output format Previously, both `fmt == f` case and Image have a rank of 1. In the end, e.g. from ipynb to html conversion, if both html and image exists, it actually prefers the image. This commit changes this, so that fmt == f is always highest rank, and rank never collides. This is achieved by keeping fmt == f case having rank 1, and every other rank increased by 1. --- test/Tests/Old.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/Tests') diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index 1d5b0b04e..e03d94e85 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -225,6 +225,8 @@ tests pandocPath = , test' "writer" ["-f", "native", "-t", "ipynb", "--wrap=preserve"] "ipynb/mime.native" "ipynb/mime.out.ipynb" + , test' "reader" ["-f", "ipynb", "-t", "html"] + "ipynb/rank.ipynb" "ipynb/rank.out.html" ] ] where -- cgit v1.2.3