diff options
author | Kolen Cheung <christian.kolen@gmail.com> | 2021-12-10 16:18:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-12-11 09:42:30 -0800 |
commit | a9a9a2c62a811d0e64062b0be628f55ba541dad7 (patch) | |
tree | 2ff6ebe370be9e0b58d300cec8a29ba3c0ae1b0c /test/ipynb/rank.out.html | |
parent | e88224621de1a8f1be4ea7ad9bf05fe635ddc3cc (diff) | |
download | pandoc-a9a9a2c62a811d0e64062b0be628f55ba541dad7.tar.gz |
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.
Diffstat (limited to 'test/ipynb/rank.out.html')
-rw-r--r-- | test/ipynb/rank.out.html | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ +<div id="5cf8f54d-bf3c-4db2-996d-22662a86ad43" class="cell code" data-execution_count="1"> +<div class="sourceCode" id="cb1"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> matplotlib.pyplot <span class="im">as</span> plt</span></code></pre></div> +</div> +<div id="a0228622-9ff8-4392-9ddd-f70a90f0e106" class="cell code" data-execution_count="2"> +<div class="sourceCode" id="cb2"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>fig, ax <span class="op">=</span> plt.subplots(figsize<span class="op">=</span>(<span class="dv">1</span>, <span class="dv">1</span>), dpi<span class="op">=</span><span class="dv">4</span>)</span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>ax.imshow([[<span class="dv">0</span>, <span class="dv">1</span>], [<span class="dv">2</span>, <span class="dv">3</span>]])<span class="op">;</span></span></code></pre></div> +<div class="output display_data"> +<p><em>you should see this when converting from ipynb to html instead of the image below.</em></p> +</div> +</div> |