summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-06-12 18:22:50 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-06-12 18:22:50 +0200
commit439782ae00dd9bb6955d474b316ff68835303c36 (patch)
treee31abf6e8db3040e9fafa2a32a57a68b803f9a1c
parent85711ba3d903fc21357202148a3379b4b27ef92a (diff)
parent0d7d12ffe6114c500cd1f183e9a2c74ba1974093 (diff)
downloadorg-mode-439782ae00dd9bb6955d474b316ff68835303c36.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index 0cd06eb..078efaf 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -4961,7 +4961,7 @@ same column as TABLE-CELL, or nil."
table)))
(width-vector (or (gethash table cache)
(puthash table (make-vector columns 'empty) cache))))
- ;; Table may not have the same number of rows. Extend
+ ;; Table rows may not have the same number of cells. Extend
;; WIDTH-VECTOR appropriately if we encounter a row larger than
;; expected.
(when (>= column (length width-vector))
@@ -5010,6 +5010,15 @@ Possible values are `left', `right' and `center'."
table)))
(align-vector (or (gethash table cache)
(puthash table (make-vector columns nil) cache))))
+ ;; Table rows may not have the same number of cells. Extend
+ ;; ALIGN-VECTOR appropriately if we encounter a row larger than
+ ;; expected.
+ (when (>= column (length align-vector))
+ (setq align-vector
+ (vconcat align-vector
+ (make-list (- (1+ column) (length align-vector))
+ nil)))
+ (puthash table align-vector cache))
(or (aref align-vector column)
(let ((number-cells 0)
(total-cells 0)