From 9cd0810f90690a7632d11548ec2e2d9bd8be19de Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 19 Mar 2013 18:25:54 +0100 Subject: [PATCH] ox.el (org-export-table-cell-alignment): Treat an empty cell as a number if it follows a number * ox.el (org-export-table-cell-alignment): Treat an empty cell as a number if it follows a number. Thanks to Kodi Arfer for reporting this. --- lisp/ox.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index f9fa03611..4637d9625 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -4259,7 +4259,8 @@ Possible values are `left', `right' and `center'." (table (org-export-get-parent-table table-cell)) (number-cells 0) (total-cells 0) - cookie-align) + cookie-align + previous-cell-number-p) (mapc (lambda (row) (cond @@ -4289,7 +4290,11 @@ Possible values are `left', `right' and `center'." (elt (org-element-contents row) column)) info))) (incf total-cells) - (when (string-match org-table-number-regexp value) + ;; Treat an empty cell as a number if it follows a number + (if (not (or (string-match org-table-number-regexp value) + (and (string= value "") previous-cell-number-p))) + (setq previous-cell-number-p nil) + (setq previous-cell-number-p t) (incf number-cells)))))) (org-element-contents table)) ;; Return value. Alignment specified by cookies has precedence