I have a filter that adds elements to code blocks (for bolding, italics, etc.). We go markdown -> html -> pdf and have noticed that sometimes there is an extra erroneous space between these custom elements in the final PDF. This breaks copying and pasting.
It's because pandoc adds newlines between some elements in the generated HTML. This shows and example:
echo -e '<div><pre><code>hello</code></pre><pre><code>world</code></pre></div>' | pandoc -t html5
<div>
<pre><code>hello</code></pre>
<pre><code>world</code></pre>
</div>
Is there a way I can get the output of the above to instead be this? (or even match the original input string)
echo -e '<div><pre><code>hello</code></pre><pre><code>world</code></pre></div>' | pandoc -t html5
<div>
<pre><code>hello</code></pre><pre><code>world</code></pre>
</div>
Thank you!