diff options
author | Dan Davison <dandavison7@gmail.com> | 2010-11-14 15:50:47 +0000 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2010-11-16 11:16:18 +0000 |
commit | b59074eca8896080ab8f6481ca367b938846fcbe (patch) | |
tree | b8c82ef90764a42889598917fa66f28085fcb46c | |
parent | fee2c2c8dab57bf11ad34526f1364154f57fb020 (diff) | |
download | org-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.el | 6 |
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. |