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.
This commit is contained in:
Dan Davison 2010-11-14 15:50:47 +00:00
parent fee2c2c8da
commit b59074eca8
1 changed files with 3 additions and 3 deletions

View File

@ -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.