Carsten, Recent changes to respect example indentations introduced a bug in both DocBook and HTML exporters. The following example
------------------------------------------------------------------------ #+BEGIN_EXAMPLE Group of lines separated by empty lines: Line One. Line Two. Line Three. Line Four. Line Five. #+END_EXAMPLE ------------------------------------------------------------------------ is exported to HTML like the following (note that every empty line in the above example is repeated 3 times): ------------------------------------------------------------------------ <pre class="example"> Lines... Line One. Line Two. Line Three. Line Four. Line Five. </pre> ------------------------------------------------------------------------ and to DocBook format like this (empty lines are removed): ------------------------------------------------------------------------ <programlisting><![CDATA[Group of lines separated by empty lines: Line One. Line Two. Line Three. Line Four. Line Five. ]]> </programlisting> ------------------------------------------------------------------------ Attached please find a patch to fix this problem. Thanks, Baoqiu
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index 12f6e8c..8a89675 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -653,7 +653,9 @@ publishing directory." (replace-match "\\2\n")) (insert line "\n") (while (and lines - (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines)))) + (or (= (length (car lines)) 0) + (not ind) + (equal ind (get-text-property 0 'original-indentation (car lines)))) (or (= (length (car lines)) 0) (get-text-property 0 'org-protected (car lines)))) (insert (pop lines) "\n")) diff --git a/lisp/org-html.el b/lisp/org-html.el index bb73f24..77f820e 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -850,7 +850,9 @@ lang=\"%s\" xml:lang=\"%s\"> (replace-match "\\2\n")) (insert line "\n") (while (and lines - (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines)))) + (or (= (length (car lines)) 0) + (not ind) + (equal ind (get-text-property 0 'original-indentation (car lines)))) (or (= (length (car lines)) 0) (get-text-property 0 'org-protected (car lines)))) (insert (pop lines) "\n"))
_______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode