summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-19 17:25:54 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-03-19 18:39:35 (GMT)
commit9cd0810f90690a7632d11548ec2e2d9bd8be19de (patch)
tree77da96349aa90276363a04b545fa305de6344ec4
parent492e20dbfa1e8112898ee2695feed626781602cb (diff)
downloadorg-mode-9cd0810f90690a7632d11548ec2e2d9bd8be19de.zip
org-mode-9cd0810f90690a7632d11548ec2e2d9bd8be19de.tar.gz
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.
-rw-r--r--lisp/ox.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index f9fa036..4637d96 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