forked from mirrors/org-mode
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:
parent
dd6b4ffcef
commit
b15a9c0c1c
|
@ -488,12 +488,12 @@ that is according to the widest non blank line in CONTENTS."
|
||||||
(if (not (org-string-nw-p contents)) contents
|
(if (not (org-string-nw-p contents)) contents
|
||||||
(let ((text-width (org-ascii--current-text-width element info))
|
(let ((text-width (org-ascii--current-text-width element info))
|
||||||
(how (org-ascii--current-justification element)))
|
(how (org-ascii--current-justification element)))
|
||||||
(if (eq how 'left) contents
|
(cond
|
||||||
;; Paragraphs are treated specially as they also need to be
|
((eq (org-element-type element) 'paragraph)
|
||||||
;; filled.
|
;; Paragraphs are treated specially as they need to be filled.
|
||||||
(if (eq (org-element-type element) 'paragraph)
|
(org-ascii--fill-string contents text-width info how))
|
||||||
(org-ascii--fill-string contents text-width info how)
|
((eq how 'left) contents)
|
||||||
(with-temp-buffer
|
(t (with-temp-buffer
|
||||||
(insert contents)
|
(insert contents)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(catch 'exit
|
(catch 'exit
|
||||||
|
|
Loading…
Reference in New Issue