Thank you for your quick reply, Thorsten. Yes, as I mentioned, and as you noticed, the HTML export does not seem to work correctly for the last case. The #BEGIN_SRC and #END_SRC delimiters are exported literally.
-- Omid Sent from my Emacs On 10/15/2013 10:53 PM, Thorsten Jolitz wrote: > > PS: > > Omid <omidl...@gmail.com> 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. >