diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-12-20 13:44:03 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-12-22 09:45:02 -0800 |
commit | 7a9832166e36f77402d5e0259647e9f5c7ba4e58 (patch) | |
tree | 38b417997812c3e04704be97c05368ea795b15fe /test/ipynb | |
parent | 0bdf37315766eb4b785002ffaf38cdb724628e7a (diff) | |
download | pandoc-7a9832166e36f77402d5e0259647e9f5c7ba4e58.tar.gz |
Add text wrapping to HTML output.
Previously the HTML writer was exceptional in not being
sensitive to the `--wrap` option. With this change `--wrap`
now works for HTML. The default (as with other formats) is
automatic wrapping to 72 columns.
A new internal module, T.P.Writers.Blaze, exports `layoutMarkup`.
This converts a blaze Html structure into a doclayout Doc Text.
In addition, we now add a line break between an `img` tag
and the associated `figcaption`.
Note: Output is never wrapped in `writeHtmlStringForEPUB`.
This accords with previous behavior since previously the HTML
writer was insensitive to `--wrap` settings. There's no real
need to wrap HTML inside a zipped container.
Note that the contents of script, textarea, and pre tags are
always laid out with the `flush` combinator, so that unwanted
spaces won't be introduced if these occur in an indented context
in a template.
Closes #7764.
Diffstat (limited to 'test/ipynb')
-rw-r--r-- | test/ipynb/rank.out.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ipynb/rank.out.html b/test/ipynb/rank.out.html index eb5176509..a82fe8bbc 100644 --- a/test/ipynb/rank.out.html +++ b/test/ipynb/rank.out.html @@ -1,8 +1,12 @@ -<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 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> +<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> |