From 4dc4918d0d667f18f3d5e3dd71e6f117ddb8af8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Mon, 13 Oct 2014 11:01:35 +0200 Subject: Imported Upstream version 8.2.10 --- lisp/ox-ascii.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lisp/ox-ascii.el') diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 4a6696e..cd2a9af 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -423,17 +423,17 @@ equivalent to `left'. For a justification that doesn't also fill string, see `org-ascii--justify-string'. Return nil if S isn't a string." - ;; Don't fill paragraph when break should be preserved. - (cond ((not (stringp s)) nil) - ((plist-get info :preserve-breaks) s) - (t (let ((double-space-p sentence-end-double-space)) - (with-temp-buffer - (let ((fill-column text-width) - (use-hard-newlines t) - (sentence-end-double-space double-space-p)) - (insert s) - (fill-region (point-min) (point-max) justify)) - (buffer-string)))))) + (when (stringp s) + (let ((double-space-p sentence-end-double-space)) + (with-temp-buffer + (let ((fill-column text-width) + (use-hard-newlines t) + (sentence-end-double-space double-space-p)) + (insert (if (plist-get info :preserve-breaks) + (replace-regexp-in-string "\n" hard-newline s) + s)) + (fill-region (point-min) (point-max) justify)) + (buffer-string))))) (defun org-ascii--justify-string (s text-width how) "Justify string S. @@ -463,7 +463,7 @@ Empty lines are not indented." "Return string S with a partial box to its left. INFO is a plist used as a communication channel." (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) - (format (if utf8p "╭────\n%s\n╰────" ",----\n%s\n`----") + (format (if utf8p "┌────\n%s\n└────" ",----\n%s\n`----") (replace-regexp-in-string "^" (if utf8p "│ " "| ") ;; Remove last newline character. -- cgit v1.2.3