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/ipynb/rank.out.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/ipynb/rank.out.html (limited to 'test/ipynb/rank.out.html') diff --git a/test/ipynb/rank.out.html b/test/ipynb/rank.out.html new file mode 100644 index 000000000..eb5176509 --- /dev/null +++ b/test/ipynb/rank.out.html @@ -0,0 +1,10 @@ +
+
import matplotlib.pyplot as plt
+
+
+
fig, ax = plt.subplots(figsize=(1, 1), dpi=4)
+ax.imshow([[0, 1], [2, 3]]);
+
+

you should see this when converting from ipynb to html instead of the image below.

+
+
-- cgit v1.2.3