diff options
author | Bastien Guerry <bzg@altern.org> | 2013-03-19 18:25:54 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-03-19 19:39:35 +0100 |
commit | 9cd0810f90690a7632d11548ec2e2d9bd8be19de (patch) | |
tree | 77da96349aa90276363a04b545fa305de6344ec4 | |
parent | 492e20dbfa1e8112898ee2695feed626781602cb (diff) | |
download | 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.el | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |