ox-ascii: Fix line break preservation

* lisp/ox-ascii.el (org-ascii--justify-element): Fix line break
  preservation.

Thanks to Miguel Ruiz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88866
This commit is contained in:
Nicolas Goaziou 2014-07-25 14:03:26 +02:00
parent dd6b4ffcef
commit b15a9c0c1c
1 changed files with 6 additions and 6 deletions

View File

@ -488,12 +488,12 @@ that is according to the widest non blank line in CONTENTS."
(if (not (org-string-nw-p contents)) contents
(let ((text-width (org-ascii--current-text-width element info))
(how (org-ascii--current-justification element)))
(if (eq how 'left) contents
;; Paragraphs are treated specially as they also need to be
;; filled.
(if (eq (org-element-type element) 'paragraph)
(org-ascii--fill-string contents text-width info how)
(with-temp-buffer
(cond
((eq (org-element-type element) 'paragraph)
;; Paragraphs are treated specially as they need to be filled.
(org-ascii--fill-string contents text-width info how))
((eq how 'left) contents)
(t (with-temp-buffer
(insert contents)
(goto-char (point-min))
(catch 'exit