浏览代码

org-table: Do not trim output of radio tables

* lisp/org-table.el (orgtbl-to-generic): Leading and trailing spaces
  could be significant, so do not trim result.  However, remove the
  final newline character.

Reported-by: lom pik <lompikvoila@gmail.com> <>
<http://permalink.gmane.org/gmane.emacs.orgmode/99171>
Nicolas Goaziou 9 年之前
父节点
当前提交
bf37cd09b1
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/org-table.el

+ 4 - 2
lisp/org-table.el

@@ -4765,7 +4765,8 @@ This may be either a string or a function of two arguments:
     (when (and backend (symbolp backend) (not (org-export-get-backend backend)))
       (user-error "Unknown :backend value"))
     (when (or (not backend) (plist-get params :raw)) (require 'ox-org))
-    (org-trim
+    ;; Remove final newline.
+    (substring
      (org-export-string-as
       ;; Return TABLE as Org syntax.  Tolerate non-string cells.
       (with-output-to-string
@@ -4820,7 +4821,8 @@ This may be either a string or a function of two arguments:
 	 (table-cell . ,(org-table--to-generic-cell params))
 	 ;; Section.  Return contents to avoid garbage around table.
 	 (section . (lambda (s c i) c))))
-      'body-only (org-combine-plists params '(:with-tables t))))))
+      'body-only (org-combine-plists params '(:with-tables t)))
+     0 -1)))
 
 (defun org-table--generic-apply (value name &optional with-cons &rest args)
   (cond ((null value) nil)