summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2010-11-14 15:50:47 +0000
committerDan Davison <dandavison7@gmail.com>2010-11-16 11:16:18 +0000
commitb59074eca8896080ab8f6481ca367b938846fcbe (patch)
treeb8c82ef90764a42889598917fa66f28085fcb46c
parentfee2c2c8dab57bf11ad34526f1364154f57fb020 (diff)
downloadorg-mode-b59074eca8896080ab8f6481ca367b938846fcbe.tar.gz
babel: Avoid addition of unnecessary ellipsis
* lisp/ob-table.el (org-babel-table-truncate-at-newline): Only add "..." if there is something after the newline.
-rw-r--r--lisp/ob-table.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ob-table.el b/lisp/ob-table.el
index cdc7a62..c0ca653 100644
--- a/lisp/ob-table.el
+++ b/lisp/ob-table.el
@@ -57,9 +57,9 @@
"Replace newline character with ellipses.
If STRING ends in a newline character, then remove the newline
character and replace it with ellipses."
- (if (and (stringp string) (string-match "[\n\r]" string))
- (concat (substring string 0 (match-beginning 0)) "...")
- string))
+ (if (and (stringp string) (string-match "[\n\r]\\(.\\)?" string))
+ (concat (substring string 0 (match-beginning 0))
+ (if (match-string 1 string) "...")) string))
(defmacro sbe (source-block &rest variables)
"Return the results of calling SOURCE-BLOCK with VARIABLES.