PS:
Omid <[email protected]> writes:
> When exporting to HTML (Org mode version 8.2.1 ELPA; GNU Emacs version
> 24.3.1) I see the a strange behavior which can be reproduced with the
> following minimal example:
>
> This exports correctly
> #+BEGIN_SRC sh
> ls
> #+END_SRC
>
> - This also exports correctly
> #+BEGIN_SRC sh
> ls
> #+END_SRC
>
> - This does NOT export correctly (code block is not detected)
> #+BEGIN_SRC sh
> ls
> #+END_SRC
>
> Is there any way around this behavior without removing the indentation
> for the code block delimiters?
This exports correctly
#+BEGIN_SRC sh
ls
#+END_SRC
- This also exports correctly
#+BEGIN_SRC sh
ls
#+END_SRC
- This does NOT export correctly (code block is not detected)
#+BEGIN_SRC sh
ls
#+END_SRC
#+begin_src emacs-lisp :exports value
(with-current-buffer
(current-buffer)
(org-export-as 'html))
#+end_src
#+results:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
[...]
This exports correctly
</p>
<div class="org-src-container">
<pre class="src src-sh">ls
</pre>
</div>
<ul class="org-ul">
<li>This also exports correctly
</li>
</ul>
<div class="org-src-container">
<pre class="src src-sh">ls
</pre>
</div>
<ul class="org-ul">
<li>This does NOT export correctly (code block is not detected)
<p>
#+BEGIN_SRC sh
</p>
</li>
</ul>
<p>
ls
</p>
<p>
#+END_SRC
</p>
with html export, the last case does look quite different from the other ones.
--
cheers,
Thorsten