html: Fix code block export (superfluous newlines)
I didn't consider that all newlines in the pre block will be printed and we thus shouldn't wrap html that has it's tags on separate lines (i.e. contains superfluous newlines) - wrapping in a div less accurately represents org-html-export but it provides the same information and gives us more freedom in the return value of HighlightCodeBlock as well as allowing us to keep the html tags on new lines (consistency).
This commit is contained in:
parent
777899c803
commit
97fe8b7850
8 changed files with 31 additions and 30 deletions
20
org/testdata/misc.html
vendored
20
org/testdata/misc.html
vendored
|
@ -114,7 +114,7 @@ for now files can be included as:
|
|||
<p>
|
||||
src block
|
||||
</p>
|
||||
<pre class="src src-org">
|
||||
<div class="src src-org">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
#+SETUPFILE: setup_file_org
|
||||
|
@ -147,7 +147,7 @@ this headline and it's content are not exported as it is marked with an =EXC
|
|||
By default =EXCLUDE_TAGS= is just =:noexport:=.
|
||||
</pre>
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
|
@ -392,13 +392,13 @@ inline code <code class="verbatim">--</code> <code class="verbatim">---</code> a
|
|||
<p>
|
||||
src/example/export blocks should not be converted!
|
||||
</p>
|
||||
<pre class="src src-sh">
|
||||
<div class="src src-sh">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
--, ---
|
||||
</pre>
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
<pre class="example">
|
||||
--, ---
|
||||
</pre>
|
||||
|
@ -427,25 +427,25 @@ The behaviour of Org mode <code class="verbatim"><s TAB</code> changed and it
|
|||
<p>
|
||||
lowercased:
|
||||
</p>
|
||||
<pre class="src src-bash">
|
||||
<div class="src src-bash">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
uname -a
|
||||
</pre>
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
uppercased
|
||||
</p>
|
||||
<pre class="src src-bash">
|
||||
<div class="src src-bash">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
uname -a
|
||||
</pre>
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="headline-24">
|
||||
|
@ -463,7 +463,7 @@ When inserting an image link like <img src="/home/amos/Pictures/Screenshots/img-
|
|||
<h3 id="headline-26">
|
||||
<a href="https://github.com/gohugoio/hugo/issues/4006">#4006</a> source code blocks in org not rendered correctly
|
||||
</h3>
|
||||
<pre class="src src-emacs-lisp">
|
||||
<div class="src src-emacs-lisp">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
(defun small-shell ()
|
||||
|
@ -474,7 +474,7 @@ When inserting an image link like <img src="/home/amos/Pictures/Screenshots/img-
|
|||
(ansi-term))
|
||||
</pre>
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
<h1 id="headline-27">
|
||||
Footnotes
|
||||
</h1>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue