瀏覽代碼

org-e-ascii: Fix export of tables with a special column or a top-left corner

* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width,
  org-e-ascii-table-row): Fix export of tables with a special column
  or a top-left angle.
Nicolas Goaziou 12 年之前
父節點
當前提交
4cf88ac31d
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      contrib/lisp/org-e-ascii.el

+ 8 - 2
contrib/lisp/org-e-ascii.el

@@ -1569,7 +1569,7 @@ are ignored."
 		 (max (length
 		       (org-export-data
 			(org-element-contents
-			 (elt (if specialp (car (org-element-contents row))
+			 (elt (if specialp (cdr (org-element-contents row))
 				(org-element-contents row))
 			      col))
 			info))
@@ -1622,10 +1622,16 @@ a communication channel."
 		   (let ((width (org-e-ascii--table-cell-width cell info))
 			 (borders (org-export-table-cell-borders cell info)))
 		     (concat
+		      ;; In order to know if CELL starts the row, do
+		      ;; not compare it with the first cell in the row
+		      ;; as there might be a special column.  Instead,
+		      ;; compare it with the first exportable cell,
+		      ;; obtained with `org-element-map'.
 		      (when (and (memq 'left borders)
 				 (eq (org-element-map
 				      table-row 'table-cell 'identity info t)
-				     cell)))
+				     cell))
+			lcorner)
 		      (make-string (+ 2 width) (string-to-char horiz))
 		      (cond
 		       ((not (memq 'right borders)) nil)