emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] Problem with html export of description list items
@ 2011-04-06  0:07 Ethan Ligon
  2011-04-06  0:38 ` [PATCH] " Ethan Ligon
  0 siblings, 1 reply; 7+ messages in thread
From: Ethan Ligon @ 2011-04-06  0:07 UTC (permalink / raw)
  To: emacs-orgmode

I've just stumbled across what I regard as a bug in the html export of
description list items.

The problem has to do with whether the specification of a description
list includes a trailing space or not; i.e., whether "- Item ::" is
treated the same way as "- Item :: ".  LaTeX export treats these as
identical.  Html export gets confused about what the description list
item is, and winds up generating a "???" for the description.

Here's an example.

#+begin_src org
* Illustration of bug in html export
  - Has a space after the colons :: so will work in latex and html
  - No space after the colons ::so won't work in html
  - Has a terminating space :: 
    - So it works in both html and latex export!
    - Even though it's difficult to distinguish from the next example.
  - Lacks a terminating space ::
    - *Doesn't* work in html export, does in latex.
#+end_src

The relevant bit of the html export
#+begin_src html
  <div id="outline-container-1" class="outline-2">
  <h2 id="sec-1"><span class="section-number-2"></span> Illustration of bug in
html export </h2>
  <div class="outline-text-2" id="text-1">
  
  <dl>
  <dt>This has a space after the colons</dt><dd>so will work
  </dd>
  <dt>???</dt><dd>This doesn't have a space after the colons ::so won't work
  </dd>
  <dt>Has a terminating space</dt><dd>
  <ul>
  <li>So it works in both html and latex export!
  </li>
  <li>Even though it's difficult to distinguish from the next example.
  </li>
  </ul>
  
  </dd>
  <dt>???</dt><dd>Lacks a terminating space ::
  <ul>
  <li><b>Doesn't</b> work in html export, does in latex.
  </li>
  </ul>
  
  </dd>
  </dl>
  
  </div>
  </div>
#+end_src

The relevant bit of the latex export looks like this:

#+begin_src latex
\vspace*{1cm}
\section{Illustration of bug in html export}
\label{sec-1}

\begin{description}
\item[This has a space after the colons] so will work
\item[This doesn't have a space after the colons] so won't work
\item[Has a terminating space] 
\begin{itemize}
\item So it works in both html and latex export!
\item Even though it's difficult to distinguish from the next example.
\end{itemize}
\item[Lacks a terminating space] 
\begin{itemize}
\item \textbf{Doesn't} work in html export, does in latex.
\end{itemize}
\end{description}
#+end_src

Thanks for any help!

-Ethan Ligon

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-09  3:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06  0:07 [Bug] Problem with html export of description list items Ethan Ligon
2011-04-06  0:38 ` [PATCH] " Ethan Ligon
2011-04-07 12:51   ` Nicolas Goaziou
2011-04-07 21:52     ` Ethan Ligon
2011-04-08 11:53       ` Nicolas Goaziou
2011-04-08 17:46         ` [PATCH] Fix for html & docbook " Ethan Ligon
2011-04-09  3:19         ` [PATCH] Problem with html " Ethan Ligon

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).